简体   繁体   中英

permissions for running passenger on OS X 10.6

I'm not sure how to set permissions for Passenger on OSX. I have gotten through the install fine, but I understand now that Passenger runs as whoever owns environment.rb. That's my own user and group, call it apple & apple. As I understand it, Apache runs as _www & _www. What's the right strategy here? Let's say the app is at

/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. And I don't think I can run Apache as apple & apple, right?

Is it a matter of putting myself in the _www group? Or...??

Any help gratefully received.

Dan Donaldson, Toronto

The app will run as whatever user owns config/environment.rb. The root user is discouraged and may break.

Things now are running on localhost. The answer is pretty simple: change permissions to the same as 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

and updating apache.conf to reflect same.

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. 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.

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. You can look to their site for some support as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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