I have a shared drive full of user home folders (about 90) and I want to create a script that sets the permissions on these folders as follows;
Folder name = Username (\share\private\ASMITH is the folder for ASMITH)
Administrators should have full control on the folder and all sub folders/ files
The user who's folder this should have;
On the folder it's self (full control - delete, change permissions, and change owner);
Traverse Folder / Execute File
List Folder / Read Data
Read Attributes
Read Extended Attributes
Create Files / Write Data
Create Folders/ Append Data
Write Attributes
Write Extended Attributes
Delete Subfolders and Files
Read Permissions
On all subfolders and files (full control - change permissions and change owner)
Traverse Folder / Execute File
List Folder / Read Data
Read Attributes
Read Extended Attributes
Create Files / Write Data
Create Folders/ Append Data
Write Attributes
Write Extended Attributes
Delete Subfolders and Files
Delete
Read Permissions
I am sure I can do this with xcacls but am not sure of the complete command syntax.
The idea is to create a script (or batch file .bat or .cmd) that
1) Reads the folder name and stores in a variable
2) Runs xcacls using the variable as both the destination folder and username to set permissions as listed above
3) Precedes to the next folder and repeats
4) Logs any errors to a text file
The server is Windows 2K3 R2 STD 32bit fully patched
Hope someone out there can help
eb