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

Pistachio's avatar

Envoyer and Permissions

First of all, let me explain that I am not using Forge.

I have a VPS running with php7.0 and nginx. There's a user called envoyer that has the primary group of www-data.

My issue is that every time I push to git, and Envoyer deploys, the permissions - specifically in bootstrap/ are messed up. I have to manually run sudo chmod -R 775 bootstrap/ after every deploy, which takes away from the whole automated thing. I set the storage folder permissions manually, and since the storage folder isn't touched on deployment, it stays how I set it.

So my question is. How can I set it up so that the permissions are correct after every deploy. I would rather not give sudo privileges to the envoyer user.

0 likes
1 reply
ejdelmonico's avatar

That is a good question. Envoyer is primarily setup to use Forge to provision servers. When using Forge, an SSH Key is placed into the Forge server for deploying with Envoyer. In your situation, Envoyer is deploying the project with the permissions of the user (envoyer). Maybe check https://serversforhackers.com for more info. Watch the Laravel Envoy video.

Please or to participate in this conversation.