To my knowledge, both Forge and Envoyer use the forge user to perform any tasks. I believe you would have to use the forge user to perform the restart or check the box in Envoyer...which will still use the forge user.
PHP-FPM restart not working on Envoyer - NOPASSWD
Hello there :)
I've already use Envoyer with a provisioned server from Forge. But today i would like to use Envoyer with a custom server.
Forge tell me something about a PHP-FPM reloading fail :
PHP FPM appears to be running on your server, but we were unable to reload it. This is typically because your SSH user is not allowed to reload the service without hitting a password prompt.
To allow my user to reload the service without a password, i ran the following command on my server:
echo "myuser ALL=NOPASSWD: /usr/sbin/service php5-fpm reload" | sudo tee -a /etc/sudoers.d/php-fpm > /dev/null
echo "myuser ALL=NOPASSWD: /usr/sbin/service php7.0-fpm reload" | sudo tee -a /etc/sudoers.d/php-fpm > /dev/null
To try, i'm running this command:
myuser@myhost-preprod:/$ /usr/sbin/service php7.0-fpm reload
But i still have the prompts:
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to reload 'php7.0-fpm.service'.
Authenticating as: ,,, (myuser)
Password:
Myuser is on the 'sudo' group and sudo -l gave me this output:
myuser@myhost-preprod:~$ sudo -l
Matching Defaults entries for myuser on myhost-preprod.localdomain:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User myuser may run the following commands on myhost-preprod.localdomain:
(ALL : ALL) ALL
(root) NOPASSWD: /usr/sbin/service php5-fpm reload
(root) NOPASSWD: /usr/sbin/service php7.0-fpm reload
Any idea ?
Thanks a lot
Please or to participate in this conversation.