Page 1 of 1

Mac OS X launchd daemon and RR CGI file updating

Posted: Mon Mar 17, 2008 6:41 pm
by hsthompson
I have a Launch Agent watching a directory (WatchPaths). When a file is added, removed, or altered by user interaction, the Agent is triggered. However, I need it to be triggered by updates being made by an RR CGI script -- which it is not currently doing.

Posted: Sun Mar 30, 2008 2:02 pm
by Mark
hsthompson,

Perhaps you can make the CGI log in to ftp://localhost and use FTP to update the files, this simulating user actions. I don't know whether this will work, but you might try.

Best,

Mark

Posted: Mon Mar 31, 2008 12:00 pm
by Janschenkel
You'll need to check the write permissions of the directory. When a Rev cgi script is executed, it is executed as a different user, which probably won't have write permissions on that directory.
I think the cgi executing user id is 'httpd' - and if my memory isn't failing me, there's an Apache plug-in that allows you to execute things as a different user - suExec or something like that.

Hope this helped,

Jan Schenkel.