2
$ 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 ?

1 Answer 1

6

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.

7
  • True. However grep "User " /etc/apache2/apache2.conf gives User www-data ... May 31, 2012 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. May 31, 2012 at 13:27
  • 1
    You are right. I was waiting the 10 minutes to check it. May 31, 2012 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. May 31, 2012 at 13:34
  • 1
    @JannePikkarainen Occam's razor. May 31, 2012 at 13:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .