running folder actions on subfolders created using PHP on local server


I am hoping to be able to run an applescript folder action to convert audio files uploaded to a local server on my Mac. I have a script for the actual conversion that essentially works (it needs a bit more attention, but I am looking into this).

The reason for this topic is that there are a couple of issues with the general running of the script. The php script on the webpage where the audio files are uploaded creates subfolders for these audio files based on the user login name. This is integral to the functioning of the webpage. This raises two issues though:

  1. Can I attach a folder action to the parent folder (that will contain all of the subfolders) that will run when folders are created in this parent folder and files added to these subfolders? If not, is there a way of dynamically attaching folder actions to newly created subfolders, e.g. an applescript folder action to add folder actions to subfolders as they are created?

  2. When the folders are created by the php script they have the following permissions:

Meaning that the applescript won’t run, because there aren’t the correct write permissions for converting the MP3 tracks. I wonder if there is any way around this (presumably I would need to find a way of getting the php to create folders with correct permissions)?