[SOLVED] www-data user and group both missing CentOS 7
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was working on my WordPress website and I got some HTTP ERROR 500 and then i checked the user and user groups of my WordPress via FTP and I found that all belong to 1000:1000 user. I tried to change that to www-data:www-data. But getting invalid user: 'www-data:www-data' error.
cut -d: -f1 /etc/group | sort code didn't show anything of www-data group
So its confirmed that www-data group is missing from my web server. SO now how to create a new www-data group and www-data user with same credentials?
I don't use CentOS but my understanding is that the "www-data" user/group is something used only or primarily by Debian/Ubuntu and derivatives. The user:group on the Linux systems I use and many other Linux systems is, not surprisingly: apache:apache. Look in your config files, generally the httpd.conf file will have lines such as below which will tell you the user:group
CentOS is compiled from RHEL source. By default the httpd package adds user/group apache as suggested by prior poster.
The /etc/passwd entry for user:
apache:x:48:48:Apache:/usr/share/httpd:/sbin/nologin
The /etc/group entry for group:
apache:x:48:
The first apache process will start as root then spawn the others with the non-root user and group.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.