mount_white_path

Function

This command is used to import a customized mount path to the mount path trustlist.

When mounting a drive on the WebUI, you can only mount the directory to an existing path in the trustlist. If the required path is not in the trustlist, run this command to add the path.

Syntax

  1. Run the cd /usr/local/mindx/MindXOM/tools/ command to go to the directory where the script file is stored.
  2. Run the following commands as required:
    • ./mount_white_path add Absolute_Path: adds a path to the trustlist. A maximum of 64 absolute paths can be added to the trustlist at a time. When multiple trustlist paths are added, if a path fails to be added, subsequent paths will not be added.
    • ./mount_white_path delete Absolute_Path : deletes a path from the trustlist. Only one path can be deleted at a time. A mounted path cannot be deleted from the trustlist.
    • ./mount_white_path display: displays all paths in the current trustlist.
    • The ./mount_white_path check Absolute_Path: checks whether the path is in the trustlist. Only one path can be checked at a time.
    • ./mount_white_path -h, --h, -help, or --help: displays the help information.
  • The paths in the trustlist can be directly mounted to the drive.
  • Default paths in the trustlist: /opt/mount/ and /var/lib/docker.
  • Any two paths in the trustlist cannot have a parent-child relationship.
  • The trustlist supports a maximum of 64 absolute paths.
  • The trustlist path can only be /var/lib/docker or subdirectories of /home and /opt, and cannot be /home/data/cert_backup, /home/data/, /home/log/, /home/admin/, /home/AppUser/, /home/MindXOM/, /home/MEFEdge/, /home/package/, /home/HwHiAiUser/, or their subdirectories.

Parameter Description

Parameter

Description

Value

Absolute_Path

Absolute path of the trustlist.

Absolute path information. The path contains a maximum of 255 characters.

Usage Guidelines

None

Examples

Run the cd /usr/local/mindx/MindXOM/tools/ command to go to the directory where the script file is stored.

  • Example 1: Add a path to the trustlist.
    Euler:/usr/local/mindx/MindXOM/tools # ./mount_white_path add /home/test/ 
    Command output:
    /home/test/ added successfully
  • Example 2: Delete a path from the trustlist.
    Euler:/usr/local/mindx/MindXOM/tools # ./mount_white_path delete /home/test/

    Command output:

    /home/test/ deleted successfully
  • Example 3: View all paths in the current trustlist.
    Euler:/usr/local/mindx/MindXOM/tools # ./mount_white_path display
    Command output:
    /opt/mount/
  • Example 4: Check whether a path is in the trustlist.
    Euler:/usr/local/mindx/MindXOM/tools # ./mount_white_path check /home/test/
    Command output:
    /home/test/ does not exist in the list