At 11:07 am -0700 6/2/04, Alex Rice wrote:
On Feb 6, 2004, at 12:50 AM, Dave Cragg wrote:

 Not answering your question exactly, but couldn't you have the CGI
script do a chmod on the file with shell just after it saves it.
This won't need sudo as the CGI runs as the owner of the file and
can change permissions. I just tested here and it worked.

Actually in many CGI setups, a CGI script runs as "nobody" or "www" or whatever user the httpd process is running as, regardless of who owns the script files. According to the Apache docs: "Normally, when a CGI or SSI program executes, it runs as the same user who is running the web server."

That's right. So when the CGI script creates a file, the new file's owner is whatever name the script is running under (nobody, www, etc.). So the running CGI script can change permissions on it.


Dave
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to