Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Preserve share permissions after os refresh

19 Jan 2016   #1
bhar

Windows 7 32 Bit
 
 
Preserve share permissions after os refresh

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 System SpecsSystem Spec
.
22 Jan 2016   #2
bhar

Windows 7 32 Bit
 
 

Bump
My System SpecsSystem Spec
22 Jan 2016   #3
paul1149

Linux Lite 2.8 x64 (full-featured, fast, rock-solid)
 
 

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 System SpecsSystem Spec
.

22 Jan 2016   #4
bhar

Windows 7 32 Bit
 
 

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 System SpecsSystem Spec
22 Jan 2016   #5
paul1149

Linux Lite 2.8 x64 (full-featured, fast, rock-solid)
 
 

Why not create a temporary folder for the test?
My System SpecsSystem Spec
22 Jan 2016   #6
Alejandro85

Windows 7 Ultimate 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.


Quote   Quote: Originally Posted by paul1149 View Post
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 System SpecsSystem Spec
22 Jan 2016   #7
paul1149

Linux Lite 2.8 x64 (full-featured, fast, rock-solid)
 
 

Quote:
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 System SpecsSystem Spec
23 Jan 2016   #8
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by Alejandro85 View Post
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.


Quote   Quote: Originally Posted by bhar View Post
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.


Quote   Quote: Originally Posted by Alejandro85 View Post
The share's data is not even stored in the filesystem itself
Well, technically...


Quote   Quote: Originally Posted by paul1149 View Post
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.
My System SpecsSystem Spec
23 Jan 2016   #9
bhar

Windows 7 32 Bit
 
 

Quote   Quote: Originally Posted by Pyprohly View Post
Quote   Quote: Originally Posted by Alejandro85 View Post
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.


Quote   Quote: Originally Posted by bhar View Post
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.


Quote   Quote: Originally Posted by Alejandro85 View Post
The share's data is not even stored in the filesystem itself
Well, technically...


Quote   Quote: Originally Posted by paul1149 View Post
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 System SpecsSystem Spec
23 Jan 2016   #10
Pyprohly

Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
 
 

Quote   Quote: Originally Posted by bhar View Post
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.

Quote   Quote: Originally Posted by bhar View Post
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?

Quote   Quote: Originally Posted by bhar View Post
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 System SpecsSystem Spec
Reply

 Preserve share permissions after os refresh




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
Drive share and permissions write/read/edit etc etc
Heya So here is the story. I have 5 pcs. In past they had the same user name/login/password. When I shared drive all pcs could access it edit etc etc. But now I have 5 pcs with different usernames/pws/details. Now I can still access the shared HDD but I can only read, No write,...
Network & Sharing
Best way to share with permissions? Windows 7 HomePremium
Hello..In a little of a jam here... I have 4 computers running windows 7 home premium in the same workgroup sharing files... I want one computer to be a "server" and store the important files I want one computer to be the "administrator" And the rest will be just regular users... My target -...
Network & Sharing
Network share permissions HELP!
Hey guys, Im having a weird issue trying to share a drive on my win7 machine with the rest of the house. This computer is set up as an HT-PC and i have a bunch of drive in it. Ive never had any issues with sharing anything up until now. I bought 2 2tb drives and created raid0. When trying to...
Network & Sharing
Can I preserve my windows 7 installation?
Hy .. Please help, I have a problem I'm not very familiar with installing os's or booting or forums I started by reading so many posts until I began to understand nothing... And so, I decided to search from help here, from people more experienced I had xp installed on my computer Bought a...
Installation & Setup
[HOW TO]Preserve Alpha Channel for Start Orb BMP's
Hi all, I've found a small utility to convert transparent PNG's to BMP's preserving the Alpha Channel. 1. Select BMP in the dropdown and check the "Convert only 32-bit images (with alpha channel"). 2. Drag and Drop the transparent PNG image and the BMP will be created in the same folder. ...
Customization


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 12:02.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App