Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Set folder permissions 1

Status
Not open for further replies.

Trekk

Programmer
Aug 16, 2001
66
0
0
US
I need to find a way to set NTFS permissions on folders

Here is what I have
There is a root folder named departments; and underneath that folder are all the department folders. HR,IT,Finance etc

I want to set top level folder permissions for each department. Example: HR group would have Full control on the HR folder and the IT group would have permission on the IT folder.

There are 42 departments and we are restoring from a snap server with a Linux OS to a Windows 2003 server so the permission won’t be retained from Linux when restored to the new server

Is there a way to use excel to assign the permission?

I have all my groups in an excel spreadsheet

Thanks
 
You could write a .VBS that would read your excel file, loop through the names, & run a cacls.exe to assign NTFS rights for each group to each folder. Are the folder & groups names identical & do any of them have any spaces?
 
Hi Jerz

The folders and groups are different

Example
The Finace folder is called Finance with a security group called FI

Some of the folders are named like Information_Technology with a security group of IT

Thanks
 
well sounds like you will have to maintain a list of folders and what the permissions should be?

what we did was to setup the folders and permissions how they should be, then run an audit script to audit all folder permissions. the audit script produced a log file. we then wrote a restore script which runs against the log file to reset the permissions if needed.

we did all this during a server farm migration to a netfiler
 
You could use xcacls.exe (downloadable) and build your command lines in Excel using the CONCATENATE function to produce lines like this:

Code:
xcacls.vbs \\server\sharename\userID/g domain\userID:m Domain\"Domain Admins":f /f /s /t

This removes existing permissions (g) then recursively assigns the modify permission to the user :)m)and full:)F) to members of the Domain Admins group.

Cut and paste your Excel cells into a batch file and you're good to go.

Not vb I know but hey, it works. Also, if you set lookups in your spreadsheet to OUs etc, you can have the details all automatically filled in for you all you need to do is put the userID in a cell.

HTH

HTH


Marty
Network Admin
Hilliard Schools
 
Thanks it sound like using excel is the only way to ge the job done

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top