Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.
$ ps aux | grep httpd

1003     22806  0.0  0.3  17624  7684 ?        S    May25   0:00 /opt/web/apache/bin/httpd -k start
1003      4834  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5299  0.0  0.3  17740  7804 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5503  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5875  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      5970  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      6062  0.0  0.3  17624  7672 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      6245  0.0  0.3  17624  7684 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003      6338  0.0  0.3  17624  7672 ?        S    May28   0:00 /opt/web/apache/bin/httpd -k start
1003     24091  0.0  0.3  17624  7764 ?        S    May30   0:00 /opt/web/apache/bin/httpd -k start

My apache user seems to be 1003, isn't it ?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

ps uses the UID number if the user name is over a certain number of characters (probably longer than 7 or 8 chars in your case).

From the man pages,

   euser      EUSER   effective user name. This will be the textual
                      user ID, if it can be obtained and the field width
                      permits, or a decimal representation otherwise. The n option
                      can be used to force the decimal representation.
                      (alias uname, user).

So depending on how wide the column output for user name is, your user name is probably too long.

Use grep ":1003:" /etc/passwd to see the user name and see how long it is.

share|improve this answer
    
True. However grep "User " /etc/apache2/apache2.conf gives User www-data ... –  Pierre de LESPINAY May 31 '12 at 13:23
1  
Then your httpd processes are running as ftpwestmill. You need to raise another question to solve why. I suggest you accept this as answered (if you feel it is) since it explains why it shows 1003 not ftpwestmill, and then raise a second question asking why your apache config is apparently being ignored. –  EightBitTony May 31 '12 at 13:27
1  
You are right. I was waiting the 10 minutes to check it. –  Pierre de LESPINAY May 31 '12 at 13:29
1  
@EightBitTony: Why are you so sure your grep proves the id for httpd processes? If the server is using NIS/LDAP/something else, it might very well be those override /etc/passwd. –  Janne Pikkarainen May 31 '12 at 13:34
1  
@JannePikkarainen Occam's razor. –  EightBitTony May 31 '12 at 13:51

Your Answer

 
discard

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.