I am trying to deploy my rails app on my centos server using nginx. I followed this guide : Rails Deploy Guide Nginx
and now used sFTP to upload my app built on my development machine.
Whenever I call my site I get : Errno::EACCES
permission denied Permission denied - /var/www/my_app/tmp/cache/assets
I tried to chown -R root(:root) my_app
, I tried to chmod 777 -R tmp
, rake tmp:cache:clear
. It all does not work. I really don't know why.
Thanks for any help.
The problem is likely to be with /var/www
not being writable for you. To write in /dir1/dir2
you need to at least have execution grants to all the structure.
The ideal situation is to change /var/www
to have 755 permissions.
More info in Correct permissions for /var/www and wordpress .
I fixed this issue after setting the owner of the folder to nobody
. Even though the nginx owner flag is commented out by default #nobody
, worked for me.
Try to disable SELinux http://www.crypt.gen.nz/selinux/disable_selinux.html
If it will help, make rule for sFTP client/your app.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.