How do you pass authentication on the command line?

Dave Cragg dcragg at lacscentre.co.uk
Fri Feb 6 13:59:59 EST 2004


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


More information about the use-livecode mailing list