Closed amansilla closed 4 years ago
Anybody with time to take a look here? :smile:
@amansilla I am in the middle of moving countries but I should be able to take a look next week. At first glance though this should not be necessary
@peterjmit just try to deploy as a different user than your web server user and you'll see what I mean.
@amansilla I have multiple projects (as do others AFAIK) running with the current setup and I haven't experienced or heard of any problems.
edit: Perhaps https://github.com/capistrano/symfony/issues/40 is related
up
Any news? I've the same problem here, but I've temporarily fixed doing:
after 'deploy:updated', 'pglongo:permission'
namespace :pglongo do
desc "Fix cache permissions if deploy user is different from apache user"
task :permission do
on roles :all do
paths = absolute_writable_paths
execute :setfacl, '-R -m u:"apache":rwX -m u:`whoami`:rwX', *paths
execute :setfacl, '-dR -m u:"apache":rwX -m u:`whoami`:rwX', *paths
end
end
end
Notice that I've changed '-Rn' ->'-R' and '-dRn' -> '-dR' as in the Symfony doc, otherwise it won't works.
BUMP @peterjmit
Closing due inactivity.
I think the current postion of symfony:set_permissions is wrong. If you use different users for deployment (e.g. deploy) and your web server (www-data), the files generated by symfony:cache:warmup are going to be owned by deploy user instead of www-data as it should be, since symfony:cache:warmup is executed by the deployment user after symfony:set_permission.
This pull request solves the problem and updates the readme documentation as well.