$ 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
我的 apache 用户好像是 1003,不是吗?
答案1
ps
如果用户名超过一定数量的字符(在您的情况下可能超过 7 或 8 个字符),则使用 UID 号码。
从手册页中,
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).
因此,根据用户名列输出的宽度,您的用户名可能太长。
用来grep ":1003:" /etc/passwd
查看用户名并了解其长度。