Originally posted by bubblenut
try
ps -Alf | grep httpd
[/B]
Hmm, not sure about Linux, but "-A" is not a ps(1) option on *BSD. Little "a", perhaps?
Maybe
ps -ax -o rgroup -o pid -o command | grep httpd
.
For the archives, the PHP way might be:
<?php
$file="/tmp/foobarbaz";
$tickle=touch($file);
$group=posix_getgrgid(filegroup($file));
echo $group['name'];
?>
Of course, one wonders if you couldn't just create the file and call system('ls -l"); on the directory....
Note that, with Apache as an example, many web servers use multiple processes, and what works for one process might or might not work on another. On my test box, the script above creates a file with group "wheel" ... but most of the Apache processes are actually running as group "www". Probably some Unix genius can tell us why the file seems to be created by the parent process ... if those genuii (genuises?) ever come here 😉
As for the OP, it's likely that phpinfo() is right. "apache", "www", "nobody", "httpd", and "daemon" are all pretty common usernames for Apache UID's, and many seem to use the same names for groups....