At 10:22 19.05.2002, [EMAIL PROTECTED] wrote:

>  I have written scripts to add a user to the passwd and shadow files as well
>as sendmail user files. When I run this script from the command line for
>testing all runs and completes fine. But when I run the script from apache
>via the web interface I designed it for, I get file permission errors on the
>additions to passwd and the rest of the scripts. How can I get the script to
>access those files?

You're doing something pretty risky there. the passwd/shadow files are only 
writable by root. So I suppose that when running them from the command line 
you run them as root. Apache doesn't run as root (its children which serve 
the requests atleast), so mod_perl (I suppose you *are* using mod_perl? If 
not, this is more appropriate for another newsgroup) won't either.

If you can run your script as CGI, you could use suEXEC. But really, really 
consider the security implications of what you're doing there before 
allowing users to trash your machine very fast...


-- 
Per Einar Ellefsen
[EMAIL PROTECTED]


Reply via email to