3 years ago

Wrong ownership after deploy

Posted 3 years ago by EliasSoares


I've configured my own www server (not forge), and I'm using Envoyer to deploy.

I one project specifically, my application is under src folder on git repository. So I applied an after clone deployment hook to move release/src to release.

That's my hook:

shopt -s extglob
cd {{ release }}
rm -rf !(src)
mv src/* .

The problem is that after this, the files ownership goes to myuser:myuser instead of myuser:www-data, so my files cannot be accessed by the web server.

How can I solve this?

(My envoyer user belongs to www-data group)

Please sign in or create an account to participate in this conversation.