centos8 SELinux 會阻止PM2自啟 PM2 startup自啟失敗

sudo journalctl -xe 會看到提示

 SELinux is preventing (pm2) from 'read, open' accesses on the file /opt/nvm/versions/node/v14.15.1/lib/node_modules/pm2/bin/pm2.

                                                             *****  Plugin restorecon (99.5 confidence) suggests   ************************

                                                             If you want to fix the label.
                                                             /opt/nvm/versions/node/v14.15.1/lib/node_modules/pm2/bin/pm2 default label should be lib_t.
                                                             Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case tr>
                                                             Do
                                                             # /sbin/restorecon -v /opt/nvm/versions/node/v14.15.1/lib/node_modules/pm2/bin/pm2

                                                             *****  Plugin catchall (1.49 confidence) suggests   **************************

                                                             If you believe that (pm2) should be allowed read open access on the pm2 file by default.
                                                             Then you should report this as a bug.
                                                             You can generate a local policy module to allow this access.
                                                             Do
                                                             allow this access for now by executing:
                                                             # ausearch -c '(pm2)' --raw | audit2allow -M my-pm2
                                                             # semodule -X 300 -i my-pm2.pp

執(zhí)行sudo systemctl restart pm2-scet,按journalctl 提示執(zhí)行相關命令,直到sudo systemctl restart pm2-scet成功

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結(jié)合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

友情鏈接更多精彩內(nèi)容