'nobody', despite the odd sounding name, is a fully fledged
regular user that lives in
/etc/passwd like
everyone else. Some systems have the Web server set to use a
different user, such as 'www', but the principle is the
same. Any files you create from a script running under
a Web server are "owned" by the user the Web server is
running as. On a typical system, this is 'nobody'. You
might think that since you own the scripts they run as
you, but this is not normally the case.
Since they are owned by a user, they can't be changed or
altered by anyone but that user, or the admin, of course,
unless you've granted other permissions. Be aware, though,
that other script programs on the same server may be able
to access and modify these files, even if these scripts
aren't yours.
If you want to run the scripts as a real user, and not this
'nobody' account, you have to tell your Web server to do
this explicitly. It is a bit more work to do since the
Web server will have to do some special stuff to get your
particular account activated for the purpose of running
the script, but it is more secure.
Apache has a method
called
suEXEC
which handles this. Setting it up properly can be a bit
tricky, so be careful. From the documentation:
Used properly, this feature can reduce considerably the security risks involved with allowing users to develop and run private CGI or
SSI programs. However, if suEXEC is improperly configured, it can cause any number of problems and possibly create new holes in
your computer's security. If you aren't familiar with managing setuid root programs and the security issues they present, we highly
recommend that you not consider using suEXEC.