算子包部署时出现权限不足报错

现象描述

部署自定义算子包时,出现如下报错信息:

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

问题根因

当前操作用户缺少对部署路径下vendors目录的写权限。

自定义算子包默认安装路径${INSTALL_DIR}/opp/vendors的目录权限与CANN软件包安装用户和安装配置有关:root用户安装CANN,${INSTALL_DIR}/opp/vendors权限为755;非root用户携带--install for all参数安装CANN,该目录权限为755,非root用户不带--install for all参数安装CANN时,该目录权限为750。

例如,root用户安装CANN软件包后,HwHiAiUser属组用户在对应目录部署自定义算子包,因为其他用户没有写权限,会出现上述报错信息,提示权限不足导致自定义算子包部署失败。

处理步骤