Link to home
Start Free TrialLog in
Avatar of IT Madrid
IT Madrid

asked on

Apache's www-data user equivalent on Redhat

Hi, this is a simple question. When we worked with Debian/Ubuntu, the installation of Apache from sources created an user called: "www-data"

We are testing a Redhat 8 server and we have installed Apache from sources. Seaching on the Internet, we have found that "www-data" becames "apache" user on Redhat/Centos systems.

But, after installing Apache, there is not "apache" nor "www-data" user created. I was wondering if this is something expected or there might be something wrong.

Thank you,
Daniel.
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,

If you install the Apache from the RedHat/Centos repo then you get the apache user created automaticaly.
I strongly recommend using the repo for RedHat/Centos rather than installing from source for Apache.

Regards,
    Tomas Helgi
Avatar of IT Madrid
IT Madrid

ASKER

Hi, thank you so much for replying. Tomas, I would love to move to the repo, but sadly, source is a requirement.

David, you are so right and you answer would be simple.  

I have a side problem that avoids me to check it. They script that I'm using to run Apache during the boot, it's not currently working. I created a sym-link on rc3.d  but Apache gives a problem. I'm going to mark your answer as the right one. And I think, I would open a different ticket.


Best to start a new question related to init (init/rc3.d) problems.

And the simple approach... use the default packaged Apache start/stop script.

When you open a new question about this problem, be sure to include what you're trying to fix by using a custom start/stop init script.

This command may be helpful to quickly debug the problem, which will show if the service is correctly setup to run Apache at boot time.

chkconfig --list

Open in new window


Compare your Apache listing for some other service that does start correctly at boot time, then run the appropriate chkconfig command to enable Apache to correctly start when runlevel goes to multiuser.
Just a final comment. I checked the httpd.conf file on different servers. While debian/ubuntu uses the www-data user, RedHat 8 uses 2. If Apache is installed from repos, it uses the user apache, which is created during the installation. But if Apache is installed via compiling the source code, its httpd.conf file will contain the user: daemon.

User daemon
Group daemon