Apache以用户“apache”的身份运行,但创build的文件属于“nobody”

我有Apache的httpd 2.2作为用户“Apache”运行。 但是,它创build的任何文件都属于“nobody”。 而且,它只能访问用户“nobody”可以访问的东西。 它确定似乎像apache运行“没有人”,但下面的configuration和PS输出指示,否则。 这是怎么回事?

从httpd.conf:

User apache Group apache 

apache进程:

 # ps aux | grep http root 380 0.0 0.0 61216 744 pts/0 S+ 16:24 0:00 grep http root 22077 0.0 0.2 266644 8292 ? Ss 10:22 0:00 /usr/sbin/httpd -k start apache 22099 0.0 0.1 266776 5980 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22100 0.0 0.1 267048 6172 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22101 0.0 0.1 266776 5972 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22102 0.0 0.1 266912 6028 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22103 0.0 0.1 266776 5964 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22104 0.0 0.1 266776 5976 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22105 0.0 0.1 266908 6040 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 22106 0.0 0.1 266776 5960 ? S 10:22 0:00 /usr/sbin/httpd -k start apache 23153 0.0 0.1 266776 5976 ? S 11:01 0:00 /usr/sbin/httpd -k start apache 23498 0.0 0.1 266912 6104 ? S 11:13 0:00 /usr/sbin/httpd -k start apache 25717 0.0 0.1 266776 5940 ? S 12:40 0:00 /usr/sbin/httpd -k start 

这是Passenger中的预期行为。

看到这里 :

Rails应用程序作为config / environment.rb文件的所有者启动,Rack应用程序作为config.ru文件的所有者启动。 因此,如果/home/webapps/foo/config/environment.rb由joe拥有,那么Phusion Passenger将以joe的身份启动相应的Rails应用程序。

要停止这种行为并拥有apache棒,请PassengerUserSwitching off