Skip to content

Commit

Permalink
Fixed permissions for uploads
Browse files Browse the repository at this point in the history
Fix #31
  • Loading branch information
ericclemmons committed Oct 25, 2013
1 parent 4e8cbfa commit 05d6d37
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deployment/lib/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@

desc "Fix permissions"
task :permissions do
run "find #{remote_web} -follow -type d -exec chmod 755 {} \\;"
# Avoid uploading problems if Apache owns directories
run "find #{remote_web} -follow -type d -exec chown :www-data {} \\;"

# Both deploy & Apache have 1st control of directories
run "find #{remote_web} -follow -type d -exec chmod 775 {} \\;"

# Files should not be executable, but deploy + Apache still have control
run "find #{remote_web} -follow -type f -exec chmod 644 {} \\;"

This comment has been minimized.

Copy link
@mcheck

mcheck Oct 25, 2013

For control of the files without execution, shouldn't that be chmod 664?

end

Expand Down

0 comments on commit 05d6d37

Please sign in to comment.