I had recently posted a script that was to add customers to a
bandwidth graphing utility (titled "Funkyness about escaping an @), and I
would like to thank the people who posted. And FYI triple escaping the @ was
the answer. Now I am having a problem with file permissions. Run from the
command line the script works just fine. Run via the web (how it will
beimplemented) it is run as user "nobody" and group "nobody".

The file name is /usr/local/apache/htdocs/fooness.cfg
The script runs from /usr/local/apache/cgi-bin/add_mrtg.pl
the string I am using is:
system "perl -p -i -e 's!############ END DSL BUSINESS ACCOUNTS
#############!$profile\n############ END DSL BUSINESS ACCOUNTS
#############!g' /usr/local/apache/htdocs/mrtg/fooness.cfg";
$profile is defined eariler in the script.
the apache error log says:

Can't remove /usr/local/apache/htdocs/mrtg/fooness.cfg: Permission denied,
skipping file.

        I have played with chown but the fact is "nobody" can't chown a file
that belongs to "root".  For grins I did:

chown nobody:nobody ./fooness.cfg
chmod 666 ./fooness.cfg


                Again any constructive help is greatly appreciated,
                                                Josh



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to