简体   繁体   中英

Why am I getting a permission denied error on my public folder?

This one has got me stumped. I'm deploying a Rails 3 app to Slicehost running Apache 2 and Passenger. My server is running Ruby 1.9.1 using RVM.

I am receiving a permission denied error on the "public" folder in my app. My Virtual Host is setup as follows:

<VirtualHost *:80>

  ServerName  sharerplane.com
  ServerAlias www.sharerplane.com
  ServerAlias *.sharerplane.com

  DocumentRoot /home/robinjfisher/public_html/sharerplane.com/current/public/

  <Directory "/home/robinjfisher/public_html/sharerplane.com/public/">
    AllowOverride all
    Options -MultiViews
    Order allow,deny
    Allow from all
  </Directory>

  PassengerDefaultUser robinjfisher

</VirtualHost>

I've tried the following things: trailing slash on public; no trailing slash on public; PassengerUserSwitching on and off; PassengerDefaultUser set and not set; with and without the block.

The public folder is owned by robinjfisher:www-data and Passenger is running as robinjfisher so I can't see why there are permission issues.

Does anybody have any thoughts?

Thanks

Robin

PS. Have disabled the site for the time being to avoid indexing so what is there currently is not the site in question.

Check your actual home directory. /home/robinjfisher to ensure its "other" executable bit is set. Ie, the dir has permissions of NN1 or higher where N is whatever you like (ie, 751 or 701).

I found the problem. I had moved some js/css files relating to a plugin and the plugin was then trying to reinstall them as it couldn't find them where it thought they should be.

I commented out the installation code and it works fine now.

Robin

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM