I am trying to grant access to a folder using PHP. I create a folder and then try to give the user "change/modify" access to the folder. My code looks like this:
#Grant user FULL CONTROL of Profiles folder
$grantprofile="cacls.exe ".$filepath." /e /t /g ".$username.":F";
$result=exec($grantprofile);
If I run the command from a command prompt, it works fine. For some reason, when ran from PHP, it doesn't seem to work.
I have the APACHE service running as a Domain Admin...
Is there another way to do this? Or does anyone know why this isn't working for me?
I appreciate any feedback,
Matt