doc/users_guide_snippets/tips.txt in passenger-5.0.7 vs doc/users_guide_snippets/tips.txt in passenger-5.0.8
- old
+ new
@@ -102,9 +102,47 @@
The most likely reason why your application is started as 'nobody' is probably because your startup file is owned by 'root', by 'nobody' or by an unknown user. To fix this, change the owner of the startup file to the owner that you want to run the application as.
Whatever user your application runs as, it must have read access to the <<application_root,application root>>, and read/write access to the application's 'logs' directory.
+[[user_switching_rpm_caveats]]
+==== Red Hat and CentOS caveats
+
+NOTE: This information only applies if you installed Passenger through the RPM packages provided by Phusion. If you did not installed Passenger through the RPM packages provided by Phusion, then you can ignore this section.
+
+If you installed Passenger through Phusion's RPM packages, and you want to disable user switching, then you must also change <<PassengerInstanceRegistryDir,the location of the instance registry directory>>.
+
+This is because our RPMs configure the default instance registry directory to `/var/run/passenger-instreg`, which is only writable by root. If you disable user switching, then the Passenger processes will run as
+ifdef::apache[]
+ <<PassengerDefaultUser,PassengerDefaultUser>>,
+endif::[]
+ifdef::nginx[]
+ <<PassengerDefaultUser,passenger_default_user>>,
+endif::[]
+which (as long as it's not root) won't be able to write to that directory.
+
+Note that any alternative instance registry directory must have the proper SELinux context, allowing the web server to read and write to it. We recommend that you create a directory `/var/lib/passenger-instreg` and give it the label `var_run_t`:
+
+------------------------------------------
+sudo mkdir /var/lib/passenger-instreg
+sudo chcon -t var_run_t /var/lib/passenger-instreg
+------------------------------------------
+
+ifdef::apache[]
+Then, in your Apache config file:
+
+------------------------------------------
+PassengerInstanceRegistryDir /var/lib/passenger-instreg
+------------------------------------------
+endif::[]
+ifdef::nginx[]
+Then, in your Nginx config file:
+
+------------------------------------------
+passenger_instance_registry_dir /var/lib/passenger-instreg;
+------------------------------------------
+endif::[]
+
[[finding_out_app_user]]
==== Finding out what user an application is running as
To find our what user an application is started as, first access its URL in your browser so that Phusion Passenger starts the application. For example: