ServerPilot Permissions I'm using ServerPilot to manage my servers and have setup Envoyer to deploy a WordPress site to my server. When connecting as "root" everything works fine, however when connecting as "serverpilot" (which is the default SFTP user) I get the following error:
We couldn't reload FPM on one of your servers
I'm not even sure if the ServerPilot setup uses PHP-FPM, but the fix doesn't work. Any ideas?
Try adding the serverpilot user to the www-data group perhaps?
Didn't work unfortunately.
Fixed this by connecting as root then fixing the folder permissions by running this as a post activation Deployment Hook:
chown -R serverpilot:serverpilot /srv/users/serverpilot/apps/
The solution is kind of posted in a Forge info box. You need to allow users to restart FPM without a password.
echo "serverpilot ALL=NOPASSWD: /usr/sbin/service php7.0-fpm-sp reload" | sudo tee -a /etc/sudoers.d/serverpilot > /dev/null
echo "serverpilot ALL=NOPASSWD: /usr/sbin/service php5.6-fpm-sp reload" | sudo tee -a /etc/sudoers.d/serverpilot > /dev/null
echo "serverpilot ALL=NOPASSWD: /usr/sbin/service php5.5-fpm-sp reload" | sudo tee -a /etc/sudoers.d/serverpilot > /dev/null
echo "serverpilot ALL=NOPASSWD: /usr/sbin/service php5.4-fpm-sp reload" | sudo tee -a /etc/sudoers.d/serverpilot > /dev/null
echo "serverpilot ALL=NOPASSWD: /usr/sbin/service php7.0-fpm reload" | sudo tee -a /etc/sudoers.d/serverpilot > /dev/null
But because serverpilot brands its executables, you should also alias the FPM one:
sudo ln -s /etc/init.d/php7.0-fpm-sp /etc/init.d/php7.0-fpm
If you're not using 7.0, change accordingly.
Please sign in or create an account to participate in this conversation.