Best practices for users when deploying Shopware 6 #4064
Replies: 3 comments
-
What about using groups? Make sure deployer is in www-data group and file/dir have www-data group and write permission for a group. |
Beta Was this translation helpful? Give feedback.
-
Hi @antonmedv I can add deployer to the www-data group, but how do I then deploy resulting in the correct users and permissions applied (since the directories are created by deployer)? I am trying to follow https://deployer.org/docs/7.x/recipe/shopware but am not sure about
Sorry if this is trivial but I would really like to do it "correctly". If I add deployer to the www-data group, what other steps/settings are needed? |
Beta Was this translation helpful? Give feedback.
-
Yep, set Use this in your Deployer config: set('http_user', 'www-data');
set('http_group', 'www-data');
set('writable_mode', 'chmod');
set('writable_use_sudo', false);
set('writable_chmod_mode', 'g+w');
set('writable_recursive', true); Also, set the No need for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
we are currently trying to implement a workflow for deploying our Shopware 6 instance to a Ubuntu server from a Gitlab repo using Deployer.
The deployment seems to work fine, problems still arise with the users that we are using:
The deployment is done via a user "deployer" that can login via SSH key and is able to sudo. The nginx webserver uses "www-data" for the vhost. Adter deployment all files belong to "deployer", which is a problem, since Shopware needs to write files etc. during operation. Assuming the directory "current" needs to belong to "www-data", we saw that Deployer is already able to chmod the files to the local user after deployment. This would need an elevation of rights though, which in turn would need a password (instead of the SSH key) and couldn't be done automatically.
What would be the best practice approach here? Running nginx with a different user? Adjusting any group memberships/rights/etc.?
Beta Was this translation helpful? Give feedback.
All reactions