NSWorkspace from a CGI in Panther?
NSWorkspace from a CGI in Panther?
- Subject: NSWorkspace from a CGI in Panther?
- From: Mike Hamburg <email@hidden>
- Date: Wed, 19 Nov 2003 23:14:47 -0500
I wrote a CGI script, geticon, which uses NSWorkspace to cache file
icons for an index.pl script. Under Jaguar, this meant that the script
wouldn't work if nobody was logged in, and also caused random
permissions problems. I'm logged in pretty much all the time, and I
solved the permissions problems by running it setuid (it switches back
to user www after calling [NSWorkspace sharedWorkspace];). This is a
kludge as it stands.
Now, in Panther, the script refuses to run as a CGI; calling
sharedWorkspace gives a SIGBUS. Any user can run geticon from the
command line whether or not they are logged in or can log in; any user
can run it over SSH. But when it's launched by Apache 2, it dies.
Presumably this has to do with the environment that it runs in, and
I've worked around it temporarily by running a "geticon server" that
listens for icons to thumbnail on a named pipe. How do I have to set
up that environment to avoid this kludge?
cheers,
Mike
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.