Unknown's avatar

About PC Paramedic, Inc.

I am computer technician and have been working in the field for over 25 years. I grew up with computers at home and we had them before my school had any.

Backup Restore NTFS Security & Share Permissions

https://blogs.technet.microsoft.com/askds/2008/11/24/how-to-back-up-and-restore-ntfs-and-share-permissions/

Backup and Restore of Share Permissions

To backup share permissions, export the Shares registry key.

  1. Open Regedit to the following location:
    HKLMSYSTEMCurrentControlSetServicesLanmanServerShares
  2. Right-click the Shares registry key and select Export. Give it a file name such as shareperms.reg

When you want to restore the permissions, double-click shareperms.reg to import it back into the registry.

Use the Reg tool to backup the registry key from the command line:

reg export HKLMSYSTEMCurrentControlSetServicesLanmanServerShares shareperms.reg

If you need to restore it at some point, just run:

reg import shareperms.reg

Backup and Restore of NTFS Permissions

 

Use this command to backup NTFS permissions:

icacls d:data /save ntfsperms.txt /t /c

The /T switch allows it to get subfolder permissions too. The /C switch allows it to continue even if errors are encountered (although errors will still be displayed).

Use this command to restore them:

icacls d: /restore ntfsperms.txt

 

Note that in the command to save the permissions, I specified the target folder D:Data, but when I restored them, I specified just D: as the target. Icacls is a little funky like that, and here’s why.

If you open the text file with the exported permissions (ntfsperms.txt in the above example), you’ll see that Icacls uses relative paths (in bold below). Underneath the relative paths are the permissions for the folders in Security Descriptor Definition Language (SDDL) format.

data
D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)
datafolder1
D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)
datafolder2
D:AI(A;ID;FA;;;BA)(A;OICIIOID;GA;;;BA)(A;ID;FA;;;SY)(A;OICIIOID;GA;;;SY)(A;OICIID;0x1200a9;;;BU)(A;ID;0x1301bf;;;AU)(A;OICIIOID;SDGXGWGR;;;AU)

Had I specified D:Data in the command to restore the permissions, it would have failed looking for a D:DataData folder:

D:>icacls d:data /restore perms.txt
d:datadata: The system cannot find the file specified.
Successfully processed 0 files; Failed processing 1 files

You might think specifying D: as the target in the restore command may somehow mess up the permissions on other folders at that level, but as you can see from the ntfsperms.txt output file, it only has information about the Data folder and subfolders, so that is all it will change.

System Restore / BIOS

  • Alt + F10 – Access Acer disk-to-disk (D2D) recovery partition. Note: you may need to enable the D2D option in CMOS setup.
  • F10 or F11 – Access the Compaq (Hewlett Packard) recovery partition. (Start, All Programs, Compaq, for a program to restore to factory)
  • Ctrl + F11 or F8 – Access Dell computers Dell System Restore (DSR) partition on many different models.
  • F11 – Access eMachine option to restore backup copy.
  • F11 – Access Lenovo hidden recovery partition.

Acer

F2 (BIOS Setup)
F12 (Boot Device Options)
ALT + F10 (Acer eRecovery)

ASUS

ESC (Boot Selection Menu)
F2 (BIOS Setup)
F9 (Asus Laptop Recovery)

Apple (Models 2006+)

Command + Option + P + R (PRAM and NVRAM Reset)
Command + S (Boot into Single-User Mode)
Command + V (Boot with Verbose Status)
Option (Select Hard Drive Boot Volume)
Option + N (Boot Image from Netboot Server)
Shift (Boot into Safe Mode)
C (Boot from CD Drive)
D (Boot from OS/X Recovery and perform Hardware Test)
N (Boot from Network)

Dell

CTRL + F11 (Dell™ PC Restore by Symantec)
F8 (Repair Your Computer) Dell Factory Image Restore

EI Systems

F10 (System Recovery)

Fujitsu

F2 (BIOS Setup)
F12 (Boot Menu)

Gateway

F11 or R (Gateway Recovery)

Del (BIOS)

HP / Compaq Desktops

F10 (HP Recovery)

HP Pavilion / Compaq Laptops

ESC (Startup Menu)
F1 (System Information)
F2 (System Diagnostic)
F9 (Boot Device Options)
F10 (BIOS Setup)
F11 (System Recovery)

IBM ThinkPad

F11 (IBM Product Recovery)

Intel NUC

F2 (System Setup)
F7 (BIOS Update)
F10 (Boot Menu)

Lenovo

(Lenovo OneKey Rescue System)
F2 (BIOS Setup)

F12 (Boot Menu)

create USB Recovery Media – https://pcsupport.lenovo.com/us/en/lenovorecovery

Packard Bell

F11 (Recovery Program)

Samsung

F4

Sony Vaio

F10 (VAIO Recovery Wizard)

Toshiba

0 (zero) (Toshiba Harddrive Recovery Utility)
F2 (Setup Utility)
F8 (Advanced Boot Options Menu)
F12 (Boot Menu)

tags: partition recovery