You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
Hello,
I have exactly the same problem.
I tried using chmod, works fine first time, but capistrano can not delete old releases because cache directory contains files owned by www-data.
@wasbaiti I don't have this issue on deleting old releases due to the cache folder. Did you set up permissions correctly? http://symfony.com/doc/current/setup/file_permissions.html. Note you need to give permissions to both web server user and your whoami user for cache and/or log folder.
@yellowmamba : I did set up permissions for my first release, capistrano did delete this release, bun fail to do same thing on other releases.
to work around the problem, I add a task that executes commands explained in the documentation and now it works fine.
I noticed that the difference is in the command options.
That of Capistrano, used -n and without this option it works
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/uploads
directory, the file would be under thewww-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 bywww-data
.How can I work around this?
The text was updated successfully, but these errors were encountered: