Preserve share permissions after os refresh

Page 1 of 2 12 LastLast

  1. Posts : 30
    Windows 7 32 Bit
       #1

    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 Computer


  2. Posts : 30
    Windows 7 32 Bit
    Thread Starter
       #2

    Bump
      My Computer


  3. Posts : 1,025
    Linux Lite 3.2 x64; Windows 7, 8.1
       #3

    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


  4. Posts : 30
    Windows 7 32 Bit
    Thread Starter
       #4

    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


  5. Posts : 1,025
    Linux Lite 3.2 x64; Windows 7, 8.1
       #5

    Why not create a temporary folder for the test?
      My Computer


  6. Posts : 2,468
    Windows 7 Ultimate x64
       #6

    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.


    paul1149 said:
    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


  7. Posts : 1,025
    Linux Lite 3.2 x64; Windows 7, 8.1
       #7

    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


  8. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #8

    Alejandro85 said:
    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.


    bhar said:
    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.


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


    paul1149 said:
    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 by Pyprohly; 23 Jan 2016 at 01:48.
      My Computer


  9. Posts : 30
    Windows 7 32 Bit
    Thread Starter
       #9

    Pyprohly said:
    Alejandro85 said:
    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.


    bhar said:
    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.


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


    paul1149 said:
    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


  10. Posts : 721
    Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
       #10

    bhar said:
    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.

    bhar said:
    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?

    bhar said:
    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


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 01:25.
Find Us