Error: /bin/chown: `apache:apache': invalid user

Reyner

Verified User
Joined
Dec 20, 2003
Messages
63
Hello,

I have CentOS 3.1 and got this error message:

/bin/chown: `apache:apache': invalid user

Does anyone know/experience this before?

Your help is greatly appreciated.

Thank you,

Reyner
 
Under what circumstances do you get this error?

Dring an install, or when you're trying to change a user?

I use WBEL, which should set up exactly the same as CentOS.

There is an apache user, and there is an apache group, so chown apache:apache should work.

And apache (httpd) does run as user apache, at least on our system.

Jeff
 
I notice that in my /etc/passwd, I don't have apache user and group. Is it common?
 
It should be there.

Who owns your httpd program?

# whereis httpd

then:

# ls -al /path/to/httpd

Jeff
 
Hello Jeff,

Here is what I see:

[root@s3 etc]# whereis httpd
httpd: /etc/httpd
[root@s3 etc]# ls -al /etc/httpd
total 12
drwxr-xr-x 3 root root 4096 Aug 4 14:17 .
drwxr-xr-x 41 root root 4096 Aug 4 23:40 ..
drwxr-xr-x 2 root root 4096 Aug 4 14:17 conf.d
[root@3 etc]#

Thank you,

Reyner
 
You don't have apache installed.

Did the DirectAdmin install go without errors?

While you may have other errors which need to be adressed as well, you might want to try reinstalling apache:

/usr/local/directadmin/scripts/apache.sh

Watch for errors.

Jeff
 
Hey guys,

Thanks a lot for your help!

I've tried all of the above, but then when I do setup.sh, it stops at the same point.

I finally compare the /etc/passwd with my other DA server /etc/passwd:

[root@server]# grep apache /etc/passwd
apache:x:48:48:Apache:/var/www:/bin/false

Then I copy this line:

apache:x:48:48:Apache:/var/www:/bin/false

to the /etc/passwd of the server that's getting the error. After that, DA installed smoothly.

Reyner
 
Aparrently, it didn't work as well as I thought, so I reinstalled everything and it works like a charm now! :)

DA is awesome!
 
Back
Top