Skip to content

Instantly share code, notes, and snippets.

@coop
Created August 7, 2012 23:43
Show Gist options
  • Select an option

  • Save coop/3290596 to your computer and use it in GitHub Desktop.

Select an option

Save coop/3290596 to your computer and use it in GitHub Desktop.
namespace :app do
desc <<-DESC
Change application permissions.
Because the user deploying the application is different to the user
running the application we need to ensure that the permissions on
directories are what we expect.
DESC
task :permissions do
run "chown -R #{user}:www-data #{latest_release}"
run "chmod -R g+r #{latest_release}"
run "chown www-data:www-data #{latest_release}/log/*"
run "chmod 660 #{latest_release}/log/*"
run "chmod -R g+w #{latest_release}/tmp"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment