导轨乘客的/ tmp /文件夹的权限被拒绝 [英] Rails passenger /tmp/ folder permission denied

查看:278
本文介绍了导轨乘客的/ tmp /文件夹的权限被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下午所有,

试图让我的Rails应用程序在Mac上的Apache MySQL的红宝石设置和乘客目录中工作。当我尝试通过Web前端eend我收到以下错误访问它。

  ***在产卵经理异常变量Errno :: EACCES(权限被拒绝 -  /tmp/passenger.1.0.54375/generation-0/spawn-server/socket.54643.70317578161560)(处理54643,线#<主题:0x007fe82c0519c0>):

Apache配置为这个虚拟主机看起来像这样

 <虚拟主机*:80>
  服务器名test.me
  的DocumentRoot /用户/我/项目/应用/公
  <目录/用户/我/项目/应用/公共>
     所有的AllowOverride
     选项​​-MultiViews
  < /目录>

有人能看到我缺少的是什么? FWIW文件夹它试图访问是由哪根似乎有点奇怪资

  drwsr-XR-×3根轮102 10月11日15:25 passenger.1.0.54375


解决方案

乘客假定配置/ environement.rb 的所有者(见的http://www.modrails.com/documentation/Security%20of%20user%20switching%20support.html,重新启动Apache /乘客更改生效),这用户的需求编写和 TMP 执行权限。

所以,找出谁拥有配置/ environement.rb

  $> LS -lah到config / environment.rb
-rwxr-XR-X 1 WWW的数据WWW的数据152 1月22日07:53到config / environment.rb

我在这里选择WWW的数据,因为这是我的用户Apache使用。我不reccomend根。

  $> CHOWN WWW的数据:WWW的数据到config / environment.rb

这给予用户完全访问 TMP 文件夹及其内容应该足够了:

  $>搭配chmod -R 700 TMP

Afternoon all,

Attempting to get my Rails app working on a Mac Apache MySql Ruby setup and a passenger directory. When I try and access it through the web front eend I get the following error.

*** Exception Errno::EACCES in spawn manager (Permission denied - /tmp/passenger.1.0.54375/generation-0/spawn-server/socket.54643.70317578161560) (process 54643, thread #<Thread:0x007fe82c0519c0>):

Apache config for this vhost looks like this

<VirtualHost *:80>
  ServerName test.me
  DocumentRoot /Users/me/Projects/app/public
  <Directory /Users/me/Projects/app/public>
     AllowOverride all
     Options -MultiViews
  </Directory>

Can anyone see what I am missing? FWIW the folder it tries to access is owned by root which seems a bit odd

drwsr-xr-x   3 root        wheel   102 11 Oct 15:25 passenger.1.0.54375

解决方案

Passenger assumes the owner of config/environement.rb (see http://www.modrails.com/documentation/Security%20of%20user%20switching%20support.html, restart apache/passenger for changes to take effect) and this user needs write and execute rights for tmp.

So, find out who owns config/environement.rb:

$> ls -lah config/environment.rb 
-rwxr-xr-x 1 www-data www-data 152 Jan 22 07:53 config/environment.rb

I choose www-data here, as this is the user my apache uses. I don't reccomend root.

$> chown www-data:www-data config/environment.rb

Giving this user full access to the tmp folder and its contents should be sufficient:

$> chmod -R 700 tmp

这篇关于导轨乘客的/ tmp /文件夹的权限被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆