Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to set up a Rails application on a redhat server, and in accordance with instructions I have found on multiple tutorials, I wish to set the owner of certain directories to 'www-data' so that Passenger shall have owner-access.

However, I find that this user does not exist, so I am in doubt: should I make the user with the adduser command? What I've read is that if I do so but do not set a password, the user shall be locked. Am I to create a password for this user?

The title of this thread was a bit misleading in saying 'get Rails off the ground' because I actually have had this app running for some time, but I would like to implement best practices.

share|improve this question
up vote 4 down vote accepted

You can find the user that your webserver is using by executing ps aux | grep httpd

if httpd doesn't show any information, you can try using ps aux | grep apache

There should also be a user defined in your httpd.conf file.

One way to find this is egrep -iw --color=auto 'user|group' /path/to/httpd/conf

share|improve this answer
Okay. daemon shows up in the first column for all the results except the first, which reads root. Is daemon the owner? – JellicleCat Feb 11 '13 at 23:57
Fancy. Thanks much. – JellicleCat Feb 12 '13 at 0:06

www-data is the user under which your webserver runs. This may vary so you need to check your webserver's manual to see under what user it's running. This might also be called httpd instead of www-data depending on your operating system and webserver. If you just add him it probably will not work as you need to have the specific user that's being used by your webserver.


On Red Hat the default user is apache

share|improve this answer
I get the same message for httpd: chown: invalid user: `httpd:httpd'. – JellicleCat Feb 11 '13 at 23:48
Like I said it depends on your webserver, operating system and configuration. What webserver are you running? – Lucas Kauffman Feb 11 '13 at 23:49
Apache + Phusion Passenger. (I looked in http-manual.conf for a clue as to the user name, but don't see anything that looks like a user name.) – JellicleCat Feb 11 '13 at 23:53
check what user your Apache is using by using ps aux|grep -i 'apache' – Lucas Kauffman Feb 11 '13 at 23:54
Try to see if the user apache exists – Lucas Kauffman Feb 11 '13 at 23:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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