I posted this in the Newbie section but apparently help isn't as readily available there. Anyhow, I've been searching for the past week on Google, this site, and others and have been unable to find what I'm looking for.
Basically I will have directories that my photographers will upload photos to. None of my photographers are computer savvy so I've embedded a Java applet that allows them to upload multiple files and/or directories with a single click (or two 😉). The problem is this applet does not give the uploaded files the proper permissions to be modified by a script I have in those directories.
With that said, I would like to know if it's possible to have a script recursively CHMOD the entire directory that they are creating and/or uploading to?
The applet does have the ability to forward them to a URL of my choosing once the upload has completed. I can then have the CHMOD script at the URL that I specify to change the permissions of the files they just uploaded. The idea is I do not want to have to log in via FTP and change all the permissions myself, especially since many times these pictures will be published automatically before I am even available to do so.
Below is the only code I've found that is close in idea to what I'm looking for:
<?php
$output = shell_exec('chmod -R 0777 /public_html/test/$directory');
echo "<pre>$output</pre>";
?>
Upon reading more information by the poster of the above code as well as trying it myself, it appears that you must be logged in as 'root' in order for that code to work.
Any help is appreciated. Thanks in advance.