简体   繁体   English

为什么我的公用文件夹出现拒绝权限错误?

[英]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. 我正在将Rails 3应用程序部署到运行Apache 2和Passenger的Slicehost。 My server is running Ruby 1.9.1 using RVM. 我的服务器正在使用RVM运行Ruby 1.9.1。

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; PassengerUser开启和关闭; PassengerDefaultUser set and not set; PassengerDefaultUser设置且未设置; 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. 公用文件夹由robinjfisher:www-data拥有,Passenger以robinjfisher的身份运行,所以我看不到为什么存在权限问题。

Does anybody have any thoughts? 有人有什么想法吗?

Thanks 谢谢

Robin 知更鸟

PS. 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. / home / robinjfisher以确保其“其他”可执行位已设置。 Ie, the dir has permissions of NN1 or higher where N is whatever you like (ie, 751 or 701). 即,该目录具有NN1或更高权限,其中N是您想要的值(即751或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. 我已经移动了一些与插件有关的js / css文件,然后该插件试图重新安装它们,因为找不到所需的位置。

I commented out the installation code and it works fine now. 我注释掉了安装代码,现在可以正常使用了。

Robin 知更鸟

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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