OpenSUSE:PHP - 無法執行 sudo /usr/sbin/chpasswd

OpenSUSE:PHP - 無法執行 sudo /usr/sbin/chpasswd

有人可以給點建議嗎,哪裡可能有問題。我有一個有 OpenSUSE、PHP7 和 roundcube 的伺服器。 roundcube 中的插件「密碼」引發錯誤:

PHP Error: Password plugin: Unable to execute sudo /usr/sbin/chpasswd in /srv/www/htdocs/roundcubemail/plugins/password/drivers/chpasswd.php

sudoers 檔案已手動更改:

nginx ALL=(ALL) NOPASSWD: /usr/sbin/chpasswd
Defaults:nginx !requiretty

作為 nginx 用戶,我在 shell 中嘗試了上面的命令,沒有問題。

在 php.ini 中,disable_functions = 為空,safe_mode 為 Off。

有人有想法嗎,問題可能出在哪裡?

先感謝您。

答案1

解決方案在 php-fpm.server 單元中:

# Mounts the /usr, /boot, and /etc directories read-only for processes invoked by this unit.
#ProtectSystem=full

相關內容