Reputation: 3829
I am using capistrano with git to deploy a RoR project. After deployment, the permissions in the current folder are 770 instead of 755, and it cause apache to display a forbidden page. My original folder where i work is using 755 as permissions. In my deploy.rb there is nothing about files permissions.
Why does capistrano change the permissions and how can i have correct permissions when deploying on my apache?
Upvotes: 1
Views: 922
Reputation: 1042
See this blog post with the solution: http://konradpodgorski.com/blog/2012/07/26/capifony-fix-for-deployment-on-servers-with-strict-permission-settings/
Permission changes like that is usually caused by the default umask
setting which is usually fine for normal usage. However some hosts require specific permissions (usually 755 for directories and 644 for files). This is mainly because of security reasons. The best thing you can do is to make this part of the deployment and set correct permissions.
Upvotes: 0
Reputation: 3667
I don't know about Capistrano, but git itself does not store any permissions, apart from the "executable" bit. You are supposed to achieve the expected permissions by setting an appropiate umask
in your shell.
Upvotes: 2