3
votes

Since moving to a new server (and updating to Rails 3.0.1) I'm experiencing a permissions error on my server.

ActionView::Template::Error (Permission denied  - /var/www/myapp/releases/20101106093931/public/stylesheets/.permissions_check.81834140.9998.761303):

/var/www app is set to CHMOD 755 (recursively).

The erro occurs when I try to set :cache => true in my stylesheet link tag:

<%= stylesheet_link_tag %w{ reset application }, :cache => true %>

I imagine this is caused by Rails trying to write the all.css file on the server and not having adequate permissions but at the moment everything should be run as root?

Could anybody offer any suggestion as to how to solve this?

The server is running NGinX with Passenger 3.0.0 and Rails 3.0.1

1

1 Answers

1
votes

Your rails application has no right to write. The cache => true write on your server the result. So your passenger process need to have right on your rails app directory.

755 add read right and exec right to your app but not write. So change the user owner of your Rails app to same that your passenger user.