Solved

copy file with share and security setting

Posted on 2010-09-03
7
882 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 

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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article, we will see the basic design consideration while designing a Multi-tenant web application in a simple manner. Though, many frameworks are available in the market to develop a multi - tenant application, but do they provide data, cod…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles from a Windows Server 2008 domain controller to a Windows Server 2012 domain controlle…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …

778 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