Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 574
  • Last Modified:

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,
0
Linette_Laiminger
Asked:
Linette_Laiminger
  • 5
  • 5
  • 2
1 Solution
 
WMIFCommented:
xcopy is a built in command line tool that can copy ACL information.  at a command prompt type "xcopy /?" and you will see all the options.

G:\>xcopy /?
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/V] [/W]
                           [/C] [/I] [/Q] [/F] [/L] [/G] [/H] [/R] [/T] [/U]
                           [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z]
                           [/EXCLUDE:file1[+file2][+file3]...]
...
  /O           Copies file ownership and ACL information.
...
0
 
PaulRKruegerCommented:
I thought a simple copy (not move) did the trick.
0
 
WMIFCommented:
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.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
younghvCommented:
For safety, 'copy' the folder to another location on the same hard drive, then 'move' the original over to the target drive.

Check permissions.
0
 
WMIFCommented:
a move doesnt take the permissions with it either...
0
 
younghvCommented:
WMIF,
Oh really?
0
 
younghvCommented:
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
0
 
WMIFCommented:
@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.
0
 
younghvCommented:
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.
0
 
WMIFCommented:
no offense man, but why dance around in the registry when there are tools like xcopy and robocopy to do it?
0
 
younghvCommented:
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
0
 
PaulRKruegerCommented:
It's been a while since 70-270... thanks for the refresher!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 5
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now