metacard digest, Vol 1 #122 - 8 msgs

Richard MacLemale rmaclema at pasco.k12.fl.us
Fri Mar 8 12:40:01 EST 2002


> Subject: mc & cgi question
> From: Richard MacLemale <rmaclema at pasco.k12.fl.us>
> To: <metacard at lists.runrev.com>
> Reply-To: metacard at lists.runrev.com
> 
> OK, here's a question.  When darwin mc is running, what is it running AS?
> It can write to files with read/write (everyone), but cannot write to files
> with read only (everyone.)  If I knew what it was running AS, I could put
> that into a group and simplify my life.  When I use the shell command
> whoami, it returns "root."   But that's what the shell commands are run as,
> NOT what the metatalk scripts are run as.  I can get around this by using
> shell commands to write files instead of metatalk commands (open file,
> etc.), but the question remains.  Anyone have the answer?  :)

I answered my own question and wanted to share "with the group."  I set the
owner of the actual mc file (program) to root.  When mc runs, it is running
as whoever calls it, according to the Process Viewer.  So if you call it
from Terminal it will run as you.  If you call it from a web browser it will
run as www.

ALSO, I found it VERY interesting that under OS X Server (and I assume also
OS X) if mc is tied up handling a request, the OS will launch another
instance of it!  I wrote a script that said basically wait for 10 seconds,
so that I could run it from command line and then watch the process viewer.
It came up as mc, run by root.  While in the process viewer, a user hit a
web page that called mc and another instance of mc popped up, this time
owned by www.  So this is very cool.  I always wondered what would happen if
mc was tied up running a script and someone else requested another script,
and now I know.  VERY cool!

:)
Richard MacLemale
Instructional Technology Specialist
James W. Mitchell High School
http://mitchellonline.pasco.k12.fl.us




More information about the metacard mailing list