Hello,
Thanks for reaching out, I xan understand you are facing issue while applying NTFS permissions on Shared folders using icacls command.
Step 1:
In Share folder, make sure the administrator who is executed script has Share Permission at least Read and has Full NTFS permission. Fail to set this permission will result in Access is denied.
C:\>ICACLS "\server\Share1\Notes\Doc1" /GRANT "TestLab\TestUserAndy:M"
Step 2 :
To assign NTFS permission using ICACLS with Inheritance
C:\>ICACLS "\server\Share1\Notes\Doc1" /GRANT "TestLab\TestUserAndy:(CI)(OI)M
--If the reply was helpful, please don’t forget to upvote or accept as answer. --