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.
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
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.
EDIT
On Red Hat the default user is
apache