Rails 3.1 Passenger on Apache Development environment When I go to access the index (i.e. GET) for a route I get:
Errno::EACCES in Crb_agendas#index
Showing /var/www/crbagenda/app/views/layouts/application.html.erb where line #5 raised:
Permission denied - /var/www/crbagenda/tmp/cache/assets/E2C
Extracted source (around line #5):
2: <html>
3: <head>
4: <title>CrbAgendas</title>
5: <%= stylesheet_link_tag "application" %>
6: <%= javascript_include_tag "application" %>
7: <%= csrf_meta_tags %>
8: </head>
Rails.root: /var/www/crbagenda
When I go to the path mentioned (/var/www/crbagenda/tmp/cache/assets/E2C) there is no E2C folder and root (what apache is running as) owns the assets dir... not sure what I did wrong here.... or what else I could show to help.
I found this post when I encountered this error and running chmod 777
is not the solution here.
You need to do some research on how to enable group permissions and configure apaches settings appropriately. Here is a Stack Exchange thread that details this rather well and contains useful links. Make sure apache has read, write and execute access to the appropriate directories but don't simply let ANYONE modify the directory. Locate your systems apache group and run chown
and chmod -g+[What permissions apache needs goes here]
I would suggest not running this with the -R
option and to actively look into which permission apache needs for specific directories. Link to Stack Exchange thread regarding apache permissions and permissions in general