Skip to content

Instantly share code, notes, and snippets.

@helios-ag
Created May 7, 2012 10:46
Show Gist options
  • Save helios-ag/2627191 to your computer and use it in GitHub Desktop.
Save helios-ag/2627191 to your computer and use it in GitHub Desktop.
Capifony fix to set file permissions on Ubuntu for [cache] and [logs] dirs
load 'deploy' if respond_to?(:namespace) # cap2 differentiator
Dir['vendor/bundles/*/*/recipes/*.rb'].each { |bundle| load(bundle) }
load Gem.find_files('symfony2.rb').last.to_s
# Change ACL on the app/logs and app/cache directories
after "deploy:finalize_update" do
run "setfacl -R -m u:www-data:rwx -m u:#{user}:rwx #{latest_release}/#{cache_path} #{latest_release}/#{log_path}"
run "setfacl -dR -m u:www-data:rwx -m u:#{user}:rwx #{latest_release}/#{cache_path} #{latest_release}/#{log_path}"
end
load 'app/config/deploy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment