Kaseya Community

Agent Procedure for File/Folder permissions

  • Hello All, after some searching I couldn't find a clear answer on an Agent procedure to generate File and folder permissions for a device.  I saw the Share permission audit but not a file/folder permission audit.  Is one available or does anyone have one?


  • Hello Acinphilly,

    Not sure I understood whether you want to have an Agent Procedure that does a report on a file/folder permissions or if you want something that can modify the permission of a file and folder.

    If the question is regarding the latter you just need a simple ExecuteShellCommand step and run a SetACL command.



    You also could use CACLS (deprecated) or ICACLS (buggy) as follows:

    cacls "c:\Program Files\Test\Grant.exe" /G Everyone:F /E /C

    Best Regards

  • Thank you for the reply, to clarify I am looking for a procedure that does a report on file/folder permissions.

  • The same commands can report file / folders permissions not just modify them.

    Example with SetACL to list permissions on all files in c:\kworking

    setacl -on c:\kworking -ot file -actn list -lst i:y;f:tab -rec obj

    With ICACLS:

    ICACLS c:\kworking\*.*

    Output the report to a Text File:

    ICACLS c:\kworking\*.* > c:\kworking\results.txt

    This only requires an Agent Procedure with a single ExecuteShellCommand step unless you need to do further processing after the report is generated.

  • In case if anyone needs to deny/grant/remove NTFS permission on Folders-

    icacls.exe C:\denyme /deny "Vantage\Domain Users":(X,WD,AD,WA,WEA,DC,DE,WDAC) /T /C

    ref: www.computerhope.com/icacls.htm