| Q | A |
| --- | --- |
| Issue Type | Question |
| Deployer Version | N/A |
| Local Machine OS | N/A |
| Remote Machine OS | N/A |
I noticed files are created under the account you use for authentication, but I need the files to have specific user/group, not same as SSH account. What is the best way to do this with Deployer?
If someone else gets stuck a quick workaround for this is to write a custom task, for example:
task('deploy:owner', function () {
run('chown -R www-data:www-data /var/www/site');
});
Something built-in would be nice though, it's a very common feature.
@khromov
Thank you for your idea. It is good, but it can have use root privilege. We will think about it.
What about writable?
@elfet I assume that chmods the files to be writable? I'm currently deploying a WordPress project and it doesn't play nice if the files are not owned by the web server process... The workaround task I have works well so you can consider adding native chown-capabilities a feature request!
Solved with v4.
But, how was it solved? Looking through the docs, have not found it yet.
Use run('chown ...')
Most helpful comment
If someone else gets stuck a quick workaround for this is to write a custom task, for example:
Something built-in would be nice though, it's a very common feature.