Proper permission setting on the server #3566
Replies: 3 comments 2 replies
-
Make sure your deploy user in under www-data group. Or use deployer's provision recipe: https://deployer.org/docs/7.x/getting-started#provision |
Beta Was this translation helpful? Give feedback.
-
It's important to follow best practices when it comes to setting up permissions for your deployments. Here are a few suggestions to help automate this process:
To do this, you can use the following command: sudo chown -R newuser:deploy /home/newuser/html/mystaging.dev/ Note: Replace 'deploy' with the actual group name you want to use for your deployment user group.
This will grant read, write and execute permissions to the user 'newuser' on the 'mystaging.dev' directory. |
Beta Was this translation helpful? Give feedback.
-
Hmm.. I must have missed something on a brand new server: create a new group:
Create a new user add the user to sudo
make the www-data user part of the deployment group:
created the the deployment path:
as above
as above
and my deploy.php looks like this:
but it fails :(
|
Beta Was this translation helpful? Give feedback.
-
I'm struggling to figure out how to properly set up permissions.
In the
deploy.php
, I use a non-root user to deploy the application.The deployment works but I have to manually set the ownership of the deploy_path to
www-data:www-data
. However, this prevents running futuredep deploy
commands, as the user doesn't have enough permission.I am sure there's a way to automate this, and I am not following best practices. I have looked through the docs but could not find any good resources. Any help is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions