Solved

copy file with share and security setting

Posted on 2010-09-03
7
872 Views
Last Modified: 2013-12-04
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
Comment
Question by:GordonLiq
  • 3
  • 2
  • 2
7 Comments
 
LVL 1

Expert Comment

by:DedPoet
ID: 33601720
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
 
LVL 1

Accepted Solution

by:
DedPoet earned 250 total points
ID: 33601743
To be more specific, you'll probably use a command like the following:
xcopy \\svr\shared\*.* \\svrnew\shared\*.* /E /I /H /K /O

0
 
LVL 5

Expert Comment

by:Greg Jacknow
ID: 33601752
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 

Author Comment

by:GordonLiq
ID: 33602906
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
 
LVL 5

Expert Comment

by:Greg Jacknow
ID: 33603403
Not it just copies the files and the NTFS permissions.
You would ave to do the shares and any associated permisions as well.
0
 

Author Comment

by:GordonLiq
ID: 33605193
So there is no way to copy the folders with the Share Settings?
0
 
LVL 5

Assisted Solution

by:Greg Jacknow
Greg Jacknow earned 250 total points
ID: 33606831
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

SHARE your personal details only on a NEED to basis. Take CHARGE and SECURE your IDENTITY. How do I then PROTECT myself and stay in charge of my own Personal details (and) - MY own WAY...
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now