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开发者_Python百科; 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. I.e., the dir has permissions of NN1 or higher where N is whatever you like (i.e., 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
精彩评论