Hi there,
I use ACL to set permissions on certain directories upon deployment. Here's the part of deploy.rb:
set :linked_files, ['app/config/parameters.yml']
set :linked_dirs, ["app/logs", "web/uploads"]
set :permission_method, :acl
set :file_permissions_paths, ["app/logs", "app/cache", "web/uploads"]
set :file_permissions_users, ["www-data"]
before "deploy:updated", "deploy:set_permissions:acl"
So this works on the first deployment, when you set up your directories where nothing has been created inside them yet. However, after some time, say you uploaded an image to the web/uploads directory, the file would be under the www-data user, while the directory is still owned by the deploy user. So when you deploy code again, capistrano will fail because it attempts to run acl on a directory that contains files owned by www-data.
How can I work around this?
Hi there,
I use ACL to set permissions on certain directories upon deployment. Here's the part of
deploy.rb:So this works on the first deployment, when you set up your directories where nothing has been created inside them yet. However, after some time, say you uploaded an image to the
web/uploadsdirectory, the file would be under thewww-datauser, while the directory is still owned by the deploy user. So when you deploy code again, capistrano will fail because it attempts to run acl on a directory that contains files owned bywww-data.How can I work around this?