Hi all -

Just started using cap2.0 and did the following:

cap deploy:upload FILES=public/images/foo.gif

But my web server couldn't read it.  Turns out it was because the file 
permissions were set to: -rw-r-----  1 philip  wheel

The server (not counting rails) runs as the user 'www'.

All of the other files were properly -rw-rw-r--, but those were created 
using: cap deploy.

If I touch a file in that directory it is created correctly with 
-rw-rw-r-- permissions.

I believe it has to do with line 104 of 
..../gems/capistrano-2.0.0/lib/capistrano/upload.rb which looks like this 
(wrapped):

sftp.open(real_filename,
IO::WRONLY | IO::CREAT | IO::TRUNC, options[:mode] || 0660) do |status, handle|


Why is the default permission 0660? Shouldn't it be at least 0664?  Or is 
the thought that I should set the permissions on my files to be group 
readable (but not writable) by the 'www' user?  That make more sense in a 
shared environment I suppose...

What's recommended?  Also, I don't see a way to set options[:mode] at a 
global level... should there be?

I'm happy to work on some patches, but not if it's not the right way to go 
about it...

Thanks!

-philip



--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to