Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

gilbitron's avatar

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?

0 likes
4 replies
davidfaux's avatar

Try adding the serverpilot user to the www-data group perhaps?

gilbitron's avatar
gilbitron
OP
Best Answer
Level 4

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/
keypoint's avatar

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 or to participate in this conversation.