1

I have recently changed the user of Apache from apache to my own user so that I could be the owner of the project in www. But I don't know why I am not able to access any project after I changed the user and group in /etc/httpd/conf/httpd.conf, even localhost it give me this error

"Service Unavailable The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later."

Let me know if there is a way so I could change the default user and group of Apache.

1

It seems like you changed the user the daemon is actually run as in the Apache configuration. You really, really, really don't want to do that. Not only is it not how the package is designed to run — it is also a gigantic security problem.

Presumably what you actually want is to have files in www owned and editable by you. Don't do this by changing the apache user. Create a new group, and add your user account to it and change ownership of the files appropriately.

If you need Apache to also write to files, you can add the apache user to a group like that, too. Be very careful, though, because this is the number one way in which sites get compromised. Make sure the writable files are separate from the files that apache actually serves. From my days working in university IT, note that thinking "oh, my site is custom-made and obscure -- no one will hack it" is very, very wrong.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.