Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

copy file with share and security setting

Posted on 2010-09-03
7
885 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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
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 to another domain controller. Log onto the new domain controller with a user account t…
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 …

829 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