I am using wshsell to call icacls to change a folder's permission. And it returns the following error:
C:\Windows\System32\icacls.exe C:\test\test1 /T /grant:r IFC\ailen123staff-002:R
Successfully processed 0 files; Failed processing 1 files C:\test\test1: The handle is invalid.
This same command works if i put it in DOS prompt to run it. But it fails on my asp script. I gave anonymous user as Administrator and it still fails. Any idea?
It used to work , but it suddenly stop working.
I figure it out. It was the application pool user. I changed the application pool user to administrator and the problem goes away.