Page 1 of 1 1
Topic Options
#134282 - 2005-02-22 06:05 PM Recursively edit multi user folder permissions
jabo Offline
Lurker

Registered: 2005-02-22
Posts: 2
Loc: Glasgow, Scotland
Hi,
We have a network drive with separate subdirectories on, which we map users to individually on the basis of their logon name (e.g. bloggsj for Joe Bloggs).
K:\Users\bloggsj
K:\Users\smitht
We need to go right through the "Users" dir to reset the permissions on each users directory (& any sub dirs off it).
The user directory name is the same as the user logon name.
I know I can use XCACL to do it manually, but there are a lot of users!
Please advise.

Top
#134283 - 2005-02-22 08:45 PM Re: Recursively edit multi user folder permissions
Jose Offline
Seasoned Scripter
*****

Registered: 2001-04-04
Posts: 693
Loc: Buenos Aires - Argentina
Hi jabo sup. Welcome.
You can load all users folders to an array with DirList() and then apply permissions with XCACLS, something like this:
Code:
  

$dirname="K:\Users\"
$dirlist = DIRLIST($dirname,1)
For Each $PathTarget In $dirlist
Shell "%COMSPEC% /c XCACLS.EXE "+$PathTarget+" /G "+$UserId+":C /E /T"
Next


Verify XCACLS usage and make a test on a temp directory and sample code. Cannot recall XCACLS use right now.
BTW, arnt you using "$" on K:\Users\bloggsj to hide share?

_________________________
Life is fine.

Top
#134284 - 2005-02-24 06:36 PM Re: Recursively edit multi user folder permissions
jabo Offline
Lurker

Registered: 2005-02-22
Posts: 2
Loc: Glasgow, Scotland
Hi Jose,
Thanks V much for this. Will try it out as suggested. Also managed to find Richie19Rich77 folder permissions article, which seems to follow along the same lines. Will check both.
We do use $ to hide the shares.
Cheers - jabo

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.051 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org