CGI - OS X problem

Ken Ray kray at sonsothunder.com
Tue Oct 17 01:19:39 CDT 2006


On 10/17/06 12:45 AM, "Andre Garzia" <soapdog at mac.com> wrote:

> Sarah,
> 
> CGIs will run as a special user, not the logged user, usualy they
> will run as nobody/nobody. This is a secure measure.
> 
> You can try to trap for the shell command known as who with
> 
> get shell("who")
> 
> this will echo que current logged users. The current user in the GUI
> session will be logged on ttyp1. After parsing it, you can just set
> the folder to /Users/<username>/Documents


Well that'll do it! I ran it on my Mac and got:

    kenray   console  Oct 14 17:44

It wasn't ttyp1, but it is definitely parseable. I tried it on a few other
Mac servers, and it worked like a charm!

Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com





More information about the use-livecode mailing list