Tutorial :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


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


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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »