开发者

permissions for running passenger on OS X 10.6

开发者 https://www.devze.com 2022-12-08 16:26 出处:网络
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开发者_C百科 runs as whoever owns environment.rb. That\'s my own u

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开发者_C百科 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 (i.e., 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消