1
我的Rails应用程序在写入public/
目录时遇到问题。我使用user root;
设置了nginx,我使用的capistrano配方在通过ssh连接时也使用root
。Rails/Passenger/Nginx用户权限错误
为了解决这个问题,我做了capistrano运行chmod o+w -R #{current_path}/
,但我不认为这是一个好的解决方案。我错过了什么?
我的Rails应用程序在写入public/
目录时遇到问题。我使用user root;
设置了nginx,我使用的capistrano配方在通过ssh连接时也使用root
。Rails/Passenger/Nginx用户权限错误
为了解决这个问题,我做了capistrano运行chmod o+w -R #{current_path}/
,但我不认为这是一个好的解决方案。我错过了什么?
根据的Phusion乘客的文档:
在任何情况下将应用程序以root身份运行。如果 environment.rb/config.ru作为根用户或未知用户拥有,则 Rails/Rack应用程序将以 passenger_default_user和passenger_default_group指定的用户身份运行。
http://modrails.com/documentation/Users%20guide%20Nginx.html#user_switching