Setting file permissions from command line in windows


You want to modify permissions in Windows from the DOS prompt command line.


Use cacls

cacls /?


Here are the commands to modify MS Windows/DOS files and directories.

  • Display file permissions. Replace filename with your file name.
> cacls filename...filename            NT AUTHORITYSYSTEM:FPCxxxxxxxxxxxxAdmin:F
  • Modify permissions. Here we are granting full access to the user, replace user with desired user name.
> cacls filename /E /G user:Fprocessed file: C:...filename
  • Here we see the permissions have been reset:
> cacls filename...filename           PCxxxxxxxxxuser:FNT AUTHORITYSYSTEM:FPCxxxxxxxxxxxxxAdmin:F


Leave a Reply

Your email address will not be published. Required fields are marked *