【问题标题】:Permission denied on .bash_profile when start passenger启动乘客时 .bash_profile 的权限被拒绝
【发布时间】:2016-11-08 15:42:39
【问题描述】:

我尝试独立启动乘客 (4.0.20),但收到错误 /root/.bash_profile: Permission denied。 我更改了 .bash_profile 的权限,但没有解决问题。这是一个 Ruby on Rails 应用程序,我使用的是 Nginx,ruby 2.0.0p247,rails 3.2.14。

.bash_profile 的内容

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
   . ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH

【问题讨论】:

  • 我们在这里遗漏了一堆信息:它是远程的还是本地的?轨道版本?红宝石版本?您使用的是哪个网络服务器?你在调用什么命令......请给我们一个完整的概述。
  • 谢谢,我更新了帖子。
  • 您何时收到该消息?在哪个命令之后?您是普通用户还是超级用户?
  • 以超级用户身份启动乘客时收到消息。

标签: ruby-on-rails passenger


【解决方案1】:

我在安装了 SELinux 的 Red Hat 下遇到了这个问题。我发现暂时禁用 SELinux 解决了这个问题。

https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Enabling_and_Disabling_SELinux-Disabling_SELinux.html

如果这能解决您的问题,那么您应该深入挖掘以了解如何调整 SELinux 以允许 passemger 运行。不要让 SELinux 处于禁用状态!

【讨论】:

    猜你喜欢
    • 2016-06-09
    • 1970-01-01
    • 2015-12-21
    • 2015-11-08
    • 1970-01-01
    • 2014-06-23
    • 1970-01-01
    • 2015-03-19
    • 1970-01-01
    相关资源
    最近更新 更多