简体   繁体   English

在OS X 10.6上运行乘客的权限

[英]permissions for running passenger on OS X 10.6

I'm not sure how to set permissions for Passenger on OSX. 我不确定如何在OSX上为“乘客”设置权限。 I have gotten through the install fine, but I understand now that Passenger runs as whoever owns environment.rb. 我已经完成了安装的罚款,但是现在我知道,Passenger可以作为拥有environment.rb的人运行。 That's my own user and group, call it apple & apple. 那是我自己的用户和组,称为apple&apple。 As I understand it, Apache runs as _www & _www. 据我了解,Apache以_www和_www运行。 What's the right strategy here? 这里正确的策略是什么? Let's say the app is at 假设应用程式位于

/Users/apple/Documents/projects/my_rails_app / Users / apple / Documents / projects / my_rails_app

I'm assuming that I don't set the owner and group of everything in that path to _www. 我假设我没有将该路径中所有内容的所有者和组设置为_www。 And I don't think I can run Apache as apple & apple, right? 而且我不认为我可以像苹果和苹果一样运行Apache,对吗?

Is it a matter of putting myself in the _www group? 将自己放入_www小组是否有问题? Or...?? 要么...??

Any help gratefully received. 非常感谢任何帮助。

Dan Donaldson, Toronto 丹·唐纳森(Dan Donaldson),多伦多

The app will run as whatever user owns config/environment.rb. 该应用程序将以任何用户拥有config / environment.rb的身份运行。 The root user is discouraged and may break. 不鼓励root用户,并且可能会中断。

Things now are running on localhost. 现在事情正在本地主机上运行。 The answer is pretty simple: change permissions to the same as apache. 答案很简单:将权限更改为与apache相同。 The difficulty came because the permissions and ownership have to be the same up to the root of the directory. 出现困难的原因是,直到目录的根目录,权限和所有权必须相同。 That was easier to do by using 使用以下方法更容易做到

/Library/Webserver/Documents/my_rails_app /图书馆/ Web服务器/文档/ my_rails_app

and updating apache.conf to reflect same. 并更新apache.conf以反映相同的内容。

You shouldn't have to do anything, assuming your Passenger installation is clean (ie, you've reinstalled it and reconfigured the config files since upgrading to Snow Leopard) and you haven't messed with the defaults. 您无需做任何事情,前提是您的Passenger安装是干净的(即,自从升级到Snow Leopard之后,您已经重新安装了它并重新配置了配置文件),并且没有弄乱默认设置。 User switching is supposed to be enabled by default, and the Passenger process that runs your application should automatically suexec to your own user account. 默认情况下,应该启用用户切换功能,并且运行您的应用程序的“乘客”进程应自动suexec到您自己的用户帐户。

If it isn't working that way, check to make sure you're using OS X's built-in Apache server and then double-check everything in your Passenger configuration. 如果该方法无法正常工作,请检查以确保您使用的是OS X的内置Apache服务器,然后再次检查“乘客”配置中的所有内容。 You can look to their site for some support as well. 您也可以向他们的网站寻求支持。

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

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