Change upload behaviour that fix permission issue#37
Conversation
The problem happens when you, for example chown logrotate config files to root. Then permission issue will happen if deploy_user is not root.
|
Thanks for the PR, the tricky thing is that the Potentially we need another way of indicating that certain files should be chowned to root after upload. I'll have a bit of a play over the weekend and see if I can come up with something. Any suggestions much appreciated! |
|
No. It's not chowned after upload. Here is what I did previously to chown logrotate config. sudo :chown, symlink[:chown_source], "#{shared_path}/config/#{symlink[:source]}" if symlink[:chown_source]Now in config/deploy.rb set(:symlinks, [
{
source: "nginx.conf",
link: "/etc/nginx/sites-enabled/{{full_app_name}}.conf"
},
{
source: "log_rotation",
link: "/etc/logrotate.d/{{full_app_name}}",
chown_source: "root:root"
}
])So I can choose what user I need to be the owner. |
|
Facing the same issue. Trying out this solution. |
|
Still not working. |
The problem happens when you, for example chown logrotate config files to root. Then permission issue will happen if deploy_user is not root.