You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Christian Goetze <cg...@addamark.com> on 2003/12/03 22:30:34 UTC
[users@httpd] The real meaning of User #-1 ?
I am trying to set up a script that will take the value of the "User"
directive and create a subdirectory writeable for that user. I'd like to
be able to do something like:
if ($user =~ /^\#(.*)/) {
print "chown $1 dir\n";
} else {
print "chown $user dir\n";
}
The trouble is that "#-1" will not work. I realize that this is a common
idiom to refer to the "nobody" user, but simply setting it to the user
"nobody" fails whenever somebody, for some reason, actually has a defined
"nobody" user.
Setting -1 to 65535 works on some systems, but is not portable.
Setting -1 to MAX_INT ditto.
So, I can't be the only one doing this... what's the trick?
--
cg
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org