?
Solved

copy file with share and security setting

Posted on 2010-09-03
7
Medium Priority
?
898 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
[X]
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
  • 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 1000 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
Need protection from advanced malware attacks?

Look no further than WatchGuard's Total Security Suite, providing defense in depth against today's most headlining attacks like Petya 2.0 and WannaCry. Keep your organization out of the news with protection from known and unknown threats.

 

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 1000 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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

Auditing domain password hashes is a commonly overlooked but critical requirement to ensuring secure passwords practices are followed. Methods exist to extract hashes directly for a live domain however this article describes a process to extract u…
Let's recap what we learned from yesterday's Skyport Systems webinar.
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 …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month13 days, 12 hours left to enroll

801 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