Link to home
Start Free TrialLog in
Avatar of Jims_Computer_Services
Jims_Computer_ServicesFlag for Australia

asked on

Accidental Deletion of NTFS Permissions for Administrators on root of D:\

Hi there,

A right-royal stuff-up for a Friday afternoon!

I have accidentally deleted the "Full Control" permissions for the Administrators group at the root of D:\, which is a data drive on a SBS 2008 server.

I notice that the volume's Owner is SYSTEM, which has Full Control. Unfortunately, no other user or group has Full Control.

Is there any way I can write a script, scheduled to run as SYSTEM, that will re-add the permissions for the Administrators group?

Actually, the above question was just my train of thought. If you;ve got a better idea, bring it on!!!

Thanks n regs,
Bill.
ASKER CERTIFIED SOLUTION
Avatar of HaiFai
HaiFai
Flag of Finland 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
To take the ownship of file folder or drive.

For Files:
 
takeown /f file_name /d y
 icacls file_name /grant administrators:F
 
For Folders or Directories (will perform action recursively):
 
takeown /f directory_name /r /d y
 icacls directory_name /grant administrators:F /t
Hi,

You can use PSexec to run a script as System

http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx

You can use a script to set the permissions. you would need to create the script, but the cacls command is what you need.

http://support.microsoft.com/kb/288292

Regards

Gordon
Avatar of Rob Williams
As HaiFai stated, as a machine administrator you can simply go into advanced NTFS?Security permissions and take ownership of the drive/folder and subfolders and files., you can then reassign permissions.
Any luck etting it sorted?
Avatar of Jims_Computer_Services

ASKER

Thanks HaiFai. Your answer was a no-brainer. Shame I had no brain at the time but, understandably, I was in a bit of a flap!!!