I'm trying to give ppan full control to folder c:\ppan via cacls.exe in php but nothing seems to happen via the codes below...

I've already grant cacls.exe/IUSER execute and read permission.

I've tried cmd.exe with the same permission as cacls.exe and it does work (c:\windows\system32\cmd.exe /c echo Hello World!) ..but when I substitute it with cacls.exe, nothing happens. If I copy/paste the command that has been echoed ("c:\windows\system32\cacls.exe c:\ppan /e /g ppan:F") in the command prompt, it works perfectly. Can someone help please? :queasy:

Below is the php codes....

$filepath = "c:\ppan";
$username = "ppan";
$cmd = "c:\windows\system32\cacls.exe ".$filepath." /e /g ".$username.":F";
echo $cmd;
$result = exec($cmd);
echo $result;

NOTE: I'm using IIS

    Write a Reply...