Go Premium for a chance to win a PS4. Enter to Win

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

copy file with share and security setting

Hi ,
I have a shared folder   in windows 2003 box , svr\shared
there are lots of sub folder with different share and security settings.

now I am planning to move the folder to new windows 2008 R2 box   svrnew\sharedfoler

Can I copy the folder from old to new box and keep the share and security setting so that I just change the reference in clients?
0
GordonLiq
Asked:
GordonLiq
  • 3
  • 2
  • 2
2 Solutions
 
DedPoetCommented:
Sure.  Just use xcopy.  From a command prompt type xcopy -? and you will see a list of all the switches.  The one that copies the ownership and ACL security is /O
0
 
DedPoetCommented:
To be more specific, you'll probably use a command like the following:
xcopy \\svr\shared\*.* \\svrnew\shared\*.* /E /I /H /K /O

0
 
Greg JacknowCommented:
The above command does copy all the NTFS security of the objects you are copying.
You should double check the root folder of what you are copying to make sure its permissions got over as well.
Also this does not take into account any objects local to the server.  Domain accounts and accounts like the local servers administrator are fine, but if you have any accounts defined on the local server they don't exist with the same SID on the new server and won't be copied.
You will also have to check the share permissions on the old share and put them on the new share when you create it.  Most folks use everyone or "authenticated users" on the share and let the ntfs security do all the work.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
GordonLiqAuthor Commented:
Does this copy the share settings as well.

says I have a subfolder \\svr\shared\mysettins  Shared as \\svr\myPersonSetting , does this copied as well?
0
 
Greg JacknowCommented:
Not it just copies the files and the NTFS permissions.
You would ave to do the shares and any associated permisions as well.
0
 
GordonLiqAuthor Commented:
So there is no way to copy the folders with the Share Settings?
0
 
Greg JacknowCommented:
Well the share setting are stored in the registry of the server.  They are not attacted to the folder object directly, so copy utils like xcopy do not catch them.
How many shares do you have?  Is it really worth the time to automate it?
You can buy SecureCopy from scriptLogic to make the whole task easy:
There is also the MS File system migration toolkit. Though some have complained about it being clunky to use.
or You can export the registry key with the share info and import it on the new machine.  If the paths to the shared folders are different on the old and new server you have to mess with some find and replace on the exported registry key before importing.
Here are some links that talk about that:
http://blogs.technet.com/b/askds/archive/2008/11/24/how-to-back-up-and-restore-ntfs-and-share-permissions.aspx
http://support.microsoft.com/?kbid=125996
 This tool exports the share permissions to a text file.  Can't import them though,
http://technet.microsoft.com/en-us/sysinternals/bb897442.aspx
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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