I am trying to get an Automator-constructed folder action to run a sudo chmod command when nobody is logged in but a folder in /Library/WebServer is modified via http file transfer.
The script works wonderfully when an admin user is logged in and a file is uploaded from a remote http connection. However, if I log out and try to upload a file from the same remote machine, the script does not execute, even though the file is uploaded properly and the folder with the action attached to it is modified.
Yes, I have moved the folder action.app and folder action script to /Library from ~/Library.
I assume that the failure of the script to execute when nobody is logged in has something to do with the username associated with the sudo password being ambiguous or permissions? Is there any way to have a folder action execute a sudo command regardless of whether or not anybody is logged in?