Preserve share permissions after os refresh

bhar

New member
Local time
7:19 PM
Messages
30
Hi
I have windows 7 and I have shared alot of folders with a lot of users . They have a bit complex permissions.

Now I need to format the os drive and reinstall windows 7. Would I loose all permissions on those share permissions on files and folders?

How to preserve them or export and reimport them?

Or I have to re do all shares one by one?

Regards
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 32 Bit
Bump
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 32 Bit
Maybe someone with more experience will chime in, but how about copying a shared folder to another drive, or to a usb stick formatted in the ntfs file system, then pasting it back to a different drive, or to another location on the original drive? See if the shares are preserved. One factor may be the need to keep the same user name and password on the destination drive, I'm not sure. But the ntfs must be used at every step, or permissions will be lost.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) x64
It's about 4tb data. The pc is member of a domain so user authentication is centralized...

Sadly I do not have enough space and bandwidth for copying it.
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 32 Bit
Why not create a temporary folder for the test?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) x64
I've done a limited search about it and found something interesting.
Apparently, the settings for the SMB server are stored within the registry keys belonging to the "Server" service (not surprisingly, given that's what provides the shares). One particular key seems interesting, storing the data about all shares, and possibly permissions too. Look here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares

The security subkey only shows binary data, so no idea what exactly it contains, but I would bet that the permissions are stored there. As a test, I would copy all this key and see what happens.
You will probably need to pay attention to what user accounts gets each permission. Since access lists are keyed by SID (not by user name), changing SIDs will break them all anyway. Being within a domain is a great help here, as the user accounts don't reside in the formated computer, but in the domain server instead.
Testing in a virtual machine with a few of them may help before doing it for real.


Maybe someone with more experience will chime in, but how about copying a shared folder to another drive, or to a usb stick formatted in the ntfs file system

That would preserve the file permissions, but not those of the shares. The share's data is not even stored in the filesystem itself, and doesn't even require NTFS (as ACL lists do). Moreover, moving a shared folder automatically deletes the share, Windows Explorer warns about this before moving.
 

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
That would preserve the file permissions, but not those of the shares. The share's data is not even stored in the filesystem itself, and doesn't even require NTFS (as ACL lists do). Moreover, moving a shared folder automatically deletes the share, Windows Explorer warns about this before moving.

Good point. He would need both share permissions and file system permissions to replicate the existing working structure, correct?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
dell precision t3400 tower
OS
Linux Lite 3.2 x64; Windows 7, 8.1
CPU
Core2Duo 2.4
Memory
6GB ddr2
Graphics Card(s)
nVidia
Hard Drives
120gb SSD, 1TB HD, 2TB HD; sata II
Internet Speed
12/2
Browser
Vivaldi, Slimjet (Chromium) x64
I've done a limited search about it and found something interesting.
Apparently, the settings for the SMB server are stored within the registry keys belonging to the "Server" service (not surprisingly, given that's what provides the shares). One particular key seems interesting, storing the data about all shares, and possibly permissions too. Look here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares

The security subkey only shows binary data, so no idea what exactly it contains, but I would bet that the permissions are stored there.
Tested and approved. The permissions of shares are all stored under the "Security" subkey of the mentioned "...\LanmanServer\Shares" regkey. The "Shares" key is where the info about each of the shares are contained.

So exporting "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares" should preserve the shares just fine.


I have windows 7 and I have shared alot of folders with a lot of users .
If all the share resources are NTFS, what I suggest, and what Microsoft actually recommends, is to simply set Full Control for Everyone on the share, and manage permissions for the share using the more detailed NTFS permissions.


The share's data is not even stored in the filesystem itself
Well, technically...


He would need both share permissions and file system permissions to replicate the existing working structure, correct?
Correct. Though he should make life easier for himself and stick to only NTFS permissions.
 
Last edited:

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
I've done a limited search about it and found something interesting.
Apparently, the settings for the SMB server are stored within the registry keys belonging to the "Server" service (not surprisingly, given that's what provides the shares). One particular key seems interesting, storing the data about all shares, and possibly permissions too. Look here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares

The security subkey only shows binary data, so no idea what exactly it contains, but I would bet that the permissions are stored there.
Tested and approved. The permissions of shares are all stored under the "Security" subkey of the mentioned "...\LanmanServer\Shares" regkey. The "Shares" key is where the info about each shares are contained.

So exporting "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\LanmanServer\Shares" should preserve the shares just fine.


I have windows 7 and I have shared alot of folders with a lot of users .
If all the share resources are NTFS, what I suggest, and what Microsoft actually recommends, is to simply set Full Control for Everyone on the share, and manage permissions for the share using the more detailed NTFS permissions.


The share's data is not even stored in the filesystem itself
Well, technically...


He would need both share permissions and file system permissions to replicate the existing working structure, correct?
Correct. Though he should make life easier for himself and stick to only NTFS permissions.
The drive on which all shared data is placed is formatted using ntfs.
At share level everyone had full access.
Granular restrictions are applied using ntfs.

Will a format of os drive and reinstall of windows preserve ntfs permissions?
In such case I can just share that data worth everyone as ntfs permissions will be present for real acl.
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 32 Bit
The drive on which all shared data is placed is formatted using ntfs.
At share level everyone had full access.
Great. No need to mess around with share permissions then.

Because the default permissions of a share is always Everyone, Full Control; it would probably be easier to just recreate your shares afresh after the format. Unless you have a dozen shares.

Will a format of os drive and reinstall of windows preserve ntfs permissions?
I must be missing something here, but wouldn't a formatting a drive destroy all the files on the volume along with their permissions?

In such case I can just share that data worth everyone as ntfs permissions will be present for real acl.
Could you clarify this?
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
The drive on which all shared data is placed is formatted using ntfs.
At share level everyone had full access.
Great. No need to mess around with share permissions then.

Because the default permissions of a share is always Everyone, Full Control; it would probably be easier to just recreate your shares afresh after the format. Unless you have a dozen shares.

Will a format of os drive and reinstall of windows preserve ntfs permissions?
I must be missing something here, but wouldn't a formatting a drive destroy all the files on the volume along with their permissions?

In such case I can just share that data worth everyone as ntfs permissions will be present for real acl.
Could you clarify this?

In such case I can just share that data worth everyone as ntfs permissions will be present for real acl.

This my question actually for which I want clarification.


The actual data is stored on non os drive.. In another partition.
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 32 Bit
Back
Top