I guess this could be more of a svn question but it really is to do with my rails projects and I know most rails people use svn (they do, right?), so here goes: I have just moved all my rails apps to subversion, next step: switchtower; but I am not quite there yet. I have a permissions problem with the log/ directory of all my rails projects I deply to production: My umask on my production server is quite restrictive and so when checking out my svn repositories the log dir gets the umask and my server blows up when I restart apache2/fcgi because the webserver (or fastcgi process) is trying to write to the log dir and can''t. I tried and found out that svn doesnt understand, or care, about unix permissions, so no luck setting better perms on the log dir and commiting that to my repository. I have looked into setfacl to set explicit umasks for the log dirs of my projects but this seems inelegant since everytime I add a new rails proj I will have to remember to setfacl.. It looks like switchtower can do all sorts of post-svn stuff so I am sure I could get switchtower to change some perms inside a deploy... But I was wondering how other developers handle this issue. Is there a simple elegant solution I am missing? Thanks! WJP _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On 11/3/05, Warwick Poole <rubyonrails-2afRHlPplQnzeQTLcPCl/Ni2O/JbrIOy@public.gmane.org> wrote:> I have a permissions problem with the log/ directory of all my rails > projects I deply to production: > My umask on my production server is quite restrictive and so when checking > out my svn repositories the log dir gets the umask and my server blows up > when I restart apache2/fcgi because the webserver (or fastcgi process) is > trying to write to the log dir and can''t.I don''t recall the exact syntax off the top of my head, but switchtower will allow you to execute arbitrary shell commands on the deployment servers over the SSH connection. You should be able to chmod the log directory and its contents after deploying. -- Regards, John Wilger ----------- Alice came to a fork in the road. "Which road do I take?" she asked. "Where do you want to go?" responded the Cheshire cat. "I don''t know," Alice answered. "Then," said the cat, "it doesn''t matter." - Lewis Carrol, Alice in Wonderland
Yep, I added the following lines to my restart task: sudo "chown apache:apache -R /u/apps/#{application}/current" sudo "chmod 755 -R /u/apps/#{application}/current" I suppose I could set the permissions to be more fine-grained, but you get the idea. On 11/3/05, John Wilger <johnwilger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On 11/3/05, Warwick Poole <rubyonrails-2afRHlPplQnzeQTLcPCl/Ni2O/JbrIOy@public.gmane.org> wrote: > > I have a permissions problem with the log/ directory of all my rails > > projects I deply to production: > > My umask on my production server is quite restrictive and so when checking > > out my svn repositories the log dir gets the umask and my server blows up > > when I restart apache2/fcgi because the webserver (or fastcgi process) is > > trying to write to the log dir and can''t. > > I don''t recall the exact syntax off the top of my head, but > switchtower will allow you to execute arbitrary shell commands on the > deployment servers over the SSH connection. You should be able to > chmod the log directory and its contents after deploying. > > -- > Regards, > John Wilger > > ----------- > Alice came to a fork in the road. "Which road do I take?" she asked. > "Where do you want to go?" responded the Cheshire cat. > "I don''t know," Alice answered. > "Then," said the cat, "it doesn''t matter." > - Lewis Carrol, Alice in Wonderland > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Oh, and BTW, if you go to subversion, you won''t have the log dir under SVN. It''s symlinked from outside. On 11/4/05, Kyle Maxwell <kyle-FOSOgQihYpQjo0HpFSRKWA@public.gmane.org> wrote:> Yep, I added the following lines to my restart task: > > sudo "chown apache:apache -R /u/apps/#{application}/current" > sudo "chmod 755 -R /u/apps/#{application}/current" > > I suppose I could set the permissions to be more fine-grained, but you > get the idea. > > On 11/3/05, John Wilger <johnwilger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > On 11/3/05, Warwick Poole <rubyonrails-2afRHlPplQnzeQTLcPCl/Ni2O/JbrIOy@public.gmane.org> wrote: > > > I have a permissions problem with the log/ directory of all my rails > > > projects I deply to production: > > > My umask on my production server is quite restrictive and so when checking > > > out my svn repositories the log dir gets the umask and my server blows up > > > when I restart apache2/fcgi because the webserver (or fastcgi process) is > > > trying to write to the log dir and can''t. > > > > I don''t recall the exact syntax off the top of my head, but > > switchtower will allow you to execute arbitrary shell commands on the > > deployment servers over the SSH connection. You should be able to > > chmod the log directory and its contents after deploying. > > > > -- > > Regards, > > John Wilger > > > > ----------- > > Alice came to a fork in the road. "Which road do I take?" she asked. > > "Where do you want to go?" responded the Cheshire cat. > > "I don''t know," Alice answered. > > "Then," said the cat, "it doesn''t matter." > > - Lewis Carrol, Alice in Wonderland > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > >