How can I grant permissions to a user on a directory (Read, Write, Modify) using the Windows command line?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As of Vista,
caclsis deprecated. Here’s the first couple of help lines:You should use
icaclsinstead. This is how you grant John full control overD:\testfolder and all its subfolders:According do MS documentation:
F= Full ControlCI= Container Inherit – This flag indicates that subordinate containers will inherit this ACE.OI= Object Inherit – This flag indicates that subordinate files will inherit the ACE./T= Apply recursively to existing files and sub-folders. (OIandCIonly apply to new files and sub-folders). Credit: comment by @AlexSpence.For complete documentation, you may run “
icacls” with no arguments or see the Microsoft documentation here and here