Jump to content

URGENT Help Needed to replace NFTS perms on 2000 Home Dirs


Recommended Posts

Posted

Hey gyus,

 

Ihave had to come into school as it would appear that the user perms on thier home folders have been stripped out.

 

How this has happened I will look at later but right now does anyone have any ideas how to get the user perms back on quickly.

 

Thanks for the help but lack of sleep (new baby) has left my brain fried ;-)

Posted

If the folders are named after the users look at http://www.wisesoft.co.uk/Products/NTFSFix/

 

I've used this recently to fix similar issues. (Must be run from local drive)

 

As for why, if the server is 2003 but not SP2 there is a bug in chkdsk that removes ACL entries if the file table is bigger than a certain size or contains more than 4m entries (shadow copies put me over). I lost around 70k file permissions with no idea which files were affected.

Posted
Im not sure but can you restore them using the shadow copy if you have that running

 

It's the entire filesystem, this means shadow copy is also affected afaik

Posted

If you have a backup you can use robocopy to just copy the permissions and ownership details...

Restore your backup to a network drive... and then use robobcopy source destination /s /is /copy:so IIRC

Posted

I have a script to fix this problem (I created it when I did a network migration)... goes off to look ;)

 

Find script...

Set FSO = CreateObject("Scripting.FileSystemObject")

Set ObjShell = Wscript.CreateObject("Wscript.Shell")



ShowSubfolders FSO.GetFolder("v:\year 2006")



Sub ShowSubFolders(Folder)

   For Each Subfolder in Folder.SubFolders

       WScript.Echo "Folder = " & Subfolder

userName = SubFolder.Name

CMDLine1 = "cscript xcacls.vbs """ & Subfolder & """ /F /S /T /G BAINES\staff:r ""Domain admins"":f BAINES\" & userName & ":m"

' WScript.echo "Command = " & CMDline1

WScript.Echo "Running XCACLS..."

ObjShell.Run CMDLine1



CMDLine2 = "chown -r " & userName & " """ & Subfolder & "\*.*"""

' WScript.Echo "Command = " & CMDLine2

WScript.Echo "Running CHOWN..."

ObjShell.Run CMDLine2

   Next

End Sub

 

The script is pretty self explanatary but assumes that chown.exe and XCACLS.vbs are available. The foldernames should also be the same as the usernames.

 

I will also post this and a couple of others on the wiki in case anybody wants to develop them further.

Posted

Many thanks to all ;-)

 

Ric_ I will try out the script in the morning thanks for these.

 

I am unable to get access to WiseSoft as thier email does not seem to be working so now account confirmation email, if anyone has the installer for NTFSFix I can give you an FTP account to upload to of it is not that big email it over to me: ozan [dot] pakyuz [at] opsoftware [dot] co [dot] uk

 

It's the entire filesystem, this means shadow copy is also affected afaik

 

You are correct DMcCoy

Posted
Check out the link below. Just used this program and it's bloody brilliant. Creates bulk users and also resets folder permissions. Took a little while to figure out but seems to work a treat. I cannot take credit for discovering this, found the link here on Edugeek.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...