Skip to content

Instantly share code, notes, and snippets.

@francisco-rojas
Last active August 29, 2015 14:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francisco-rojas/14f6630d7eceaac0ee9d to your computer and use it in GitHub Desktop.
Save francisco-rojas/14f6630d7eceaac0ee9d to your computer and use it in GitHub Desktop.
Permissions of tmp and cache folder in rails for nginx (To resolve access denied)

In order to have your cache always created with a group of www-data you need to do the following:

cd yourrailsapp
chgrp www-data ./tmp
sudo chmod g+s tmp

This sets the group id on your folder so that everything underneath tmp gets created with the correct permissions

References:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment