Insufficient Permission Is Reported During OPP Deployment

Symptom

The following error message is displayed when the custom OPP is deployed:

1
2
3
[WARNING] The directory /usr/local/Ascend/latest/opp does not have sufficient permissions. Please check and modify the folder permissions (e.g., using chmod), or use the --install-path option to specify an installation path and change the environment variable ASCEND_CUSTOM_OPP_PATH to the specified path.
...
[ERROR] create /usr/local/Ascend/latest/opp/vendors/customize/framework failed

Cause Analysis

The current user does not have the write permission on the vendors directory in the deployment path.

The directory permission of the default installation path ${INSTALL_DIR}/opp/vendors of the custom OPP is related to the installation user and installation configuration of the CANN package. If the root user installs CANN, the permission of the ${INSTALL_DIR}/opp/vendors directory is 755. If a non-root user installs the CANN with the --install for all option, the permission of the directory is 755. If a non-root user installs CANN without the --install for all option, the permission of the directory is 750.

For example, after the CANN package is installed as the root user, a user from the HwHiAiUser group deploys the custom OPP in the corresponding directory. The preceding error message is displayed because other users do not have the write permission, indicating that the custom OPP fails to be deployed due to insufficient permission.

Solution

  • Method 1: Use the --install-path option and configure the environment variable ASCEND_CUSTOM_OPP_PATH to specify the installation directory. For details, see the installation scenario with a specified directory. The running user must have the read and write permissions on the specified installation path.
    1
    2
    ./custom_opp_<target os>_<target architecture>.run --install-path=<path>
    source <path>/vendors/<vendor_name>/bin/set_env.bash
    
  • Method 2: Contact the CANN installation user to change the permission on the vendors directory in the default installation path, for example, to 777.
    1
    chmod 777 /usr/local/Ascend/latest/opp/vendors/