How do you pass authentication on the command line?
dcragg at lacscentre.co.uk
Fri Feb 6 01:50:05 CST 2004
At 1:01 am -0600 6/2/04, Ken Ray wrote:
>I have a situation where I've got Panther running on my G4 and it has
>Web Services turned on. A Rev CGI is running that reaches out of the web
>server directory to another directory on disk to write a text file in a
>specific folder. However once it does this, the owner of the file is
>"www" (with read/write permissions) and the group is "wheel" (read only
>permission) and the "Other" also only has read-only permission. What I
>then need to do is have another standalone Rev app on the same machine
>open, edit, and save back to that same file. The problem is that I can't
>do that with the current permissions, and the only way I know to make it
>happen is to do a "sudo chown" through the terminal... but it asks for
>password authentication. I need to be able to do it straight from Rev.
>So how do you "sudo" via shell() in Rev and pass authentication on the
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.
More information about the use-livecode