Link to home
Start Free TrialLog in
Avatar of sneeri_c
sneeri_c

asked on

Set Folder Permissions with xcacls

This is the situation:
I have a directory with 250 directories in it.  Each directory corrosponds to a student's network id.  These are going to be their profiles directory on the server.  I need to set the permissions to Inhereit but also give the user full control to their individual directory. How do I use xcacls to do that? Is there a way to us something like %username% or can I get the name of the folder and us it.  If I have to type each one in I might as well go through the mouse clicks.

Help would be greatly apprecaited.
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Haven;t got xcacls here to check different syntax but with cacls you can do something like

@echo off
for /F "tokens=*" %%f in ('dir D:\users /ad /b') do cacls D:\users\%%f /t /e /g:%%f:F

use just one % instead of %% from command prompt and change the d:\users bit to be where your user dirs ar.

hth

Steve
ASKER CERTIFIED SOLUTION
Avatar of Steve Knight
Steve Knight
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for the points, hope it worked oK for you