What user is running my Rails app?

ⅰ亾dé卋堺 提交于 2019-12-03 03:46:51

By default, passenger will run your app as the user who owns the config/environment.rb or config.ru file, see http://www.modrails.com/documentation/Users%20guide%20Apache.html#user_switching

Passenger will run in the production environment by default unless you tell it otherwise with the RailsEnv, see http://www.modrails.com/documentation/Users%20guide%20Apache.html#rails_env

You could run ps aux | grep httpd to see what user is running your apache process.

That's what I use to detect what user should run the rails app

RAILS_USER=$(stat -c '%U' /YOUR_PATH/environment.rb) 

echo "Detected rails user: $RAILS_USER"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!