Centos – How to change the user that the Apache web server runs under in CentOS

apache-2.2centospermissionsweb-server

I have one directory called apps/cache. When a script writes some files to that directory those files are owned by the nobody user. Of course, then those files and folders are not editable by any user.

Is there any way that I can change the user nobody?

Best Answer

Use suEXEC within Apache to run your scripts as an appropriate user.

Also, consider learning a lot about setuid. A lot.