Monday, April 18, 2005

Adding User Permissions by Command Line

Often, you want to give a new user permissions to every file and subfolder within a given folder. The only problem is that the current permissions vary subfolder to subfolder. You need the CACLS command.

To add user jsmith with Read only permissions to the folder and all the subfolders without disturbing the other permissions, do this:

cacls "c:\folder1" /T /E /G jsmith:R

The /T says to do it recursively. The /E says to edit rather than replace. The /G jsmith:R is grant jsmith Read.

0 Comments:

Post a Comment

<< Home