Link to home
Start Free TrialLog in
Avatar of Linette_Laiminger
Linette_Laiminger

asked on

Copy folder to new system and retain security permissions on the folders.

How do I copy a folder to a new system and retain the security permissions of the original location in Server 2003.

Thx,
ASKER CERTIFIED SOLUTION
Avatar of WMIF
WMIF

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
Avatar of PaulRKrueger
PaulRKrueger

I thought a simple copy (not move) did the trick.
i just tried setting specific permissions on a file on my local computer, then copying (drag and drop) that file to a server share.  the permissions took the inherited permissions of that server share folder.

using xcopy without any options, i copied the file over to the share and got the same result and dragging it there.  using the /O option, it copied all the existing permissions, but also inherited the server share permissions.
Avatar of younghv
For safety, 'copy' the folder to another location on the same hard drive, then 'move' the original over to the target drive.

Check permissions.
a move doesnt take the permissions with it either...
WMIF,
Oh really?
Linette,

If you're moving files to the same 'Volume', the 'move' command will keep the same permissions as were assigned prior to the move.

If you're moving to another volume (or Host)m reading this short page from MS, it will tell you all you need to know:
http://support.microsoft.com/kb/310316


Good Luck,
Vic
@younghv - the asker is wanting to move to a new machine.  i would consider that a different volume, no?  i also found these lines in the document that you linked to, which is exactly what my suggestion is.

-To preserve permissions when files and folders are copied or moved, use the Xcopy.exe utility with the /O or the /X switch.
The object’s original permissions will be added to inheritable permissions in the new location.
-To add an object's original permissions to inheritable permissions when you copy or move an object, use the Xcopy.exe utility with the –O and –X switches.
You can modify how Windows Explorer handles permissions when objects are copied or "MOVED TO ANOTHER" NTFS volume. When you copy or move an object to another volume, the object inherits the permissions of its new folder. However, if you want to modify this behavior to preserve the original permissions, modify the registry as follows.

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. 1. Click Start, click Run, type regedit in the Open box, and then press ENTER.
2. Locate and then click the following registry key:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
 
3. On the Edit menu, click Add Value, and then add the following registry value:
Value name: ForceCopyAclwithFile
Data type: DWORD
Value data: 1
4. Exit Registry Editor.
no offense man, but why dance around in the registry when there are tools like xcopy and robocopy to do it?
None taken - the way I read that piece from MS, it looked as though you had to prep the target box BEFORE you tried the xcopy.
I may be wrong of course - which happens no more than 52 times a day.

Vic
It's been a while since 70-270... thanks for the refresher!