Click to See Complete Forum and Search --> : File permissions with CGI


kmj
02-23-2001, 02:13 PM
Yo; :)

<unnecessary prologue>
So for my expert systems class I wrote a few cgi scripts that get preferences from each of my co-workers on where they like to go to lunch; and a script that uses this information to determine where the best place
to go to lunch would be. It works pretty well, in a rough "proof of concept" way. I got an A for the project and class :). Using the experience I've gained, I want to reimplement the system to have a better interface and have some more useful/practical functionality. Currently, all my knowledge aquisition is done automatically, which is very nice, except that my add_user script creates a file with permissions such that other scripts can't modify the file unless the permissions are manually changed.
</unnessary prologue>

the question: Does anyone know how to make it so that the scripts can modify and work freely with files created by other scripts? I believe it should be as simple as adding all cgi scripts to a specific group or something. I'm not sure, though. Does anyone have any helpful information?
Thanks

YaRness
02-23-2001, 02:27 PM
you could modify the script that makes the file so that it can take parameters as commands to do the modifications itself?

but this will have some overhead... can't you just make all the scripts owned by 'nobody'? having them all in the same group sounds about right too.

also look up commands for setting permissions/owner/group/etc for the created file before the script exits.