How Can We Help?

Copying File/Share Permissions

You are here:
< Back
Copying File/Share Permissions
Last Updated: 04 Nov 2003
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

*** PLEASE NOTE: Link(s), If Provided, May Be Wrapped ***


There is often a need to copy permissions from one system
to another, whether for duplication/redundancy, or as part
of an upgrade or migration.

The following tools can be used to copy SHARE and/or FILE
level permissions:


CONSOLE

• XCOPY .................. Native Command (File Perms - Win2K and later)

• ROBOCOPY ............... Resource Kit (File Perms)
• SCOPY .................. Resource Kit (File Perms)
• SUBINACL ............... Resource Kit (File Perms/Ownership)

• PERMCOPY ............... Resource Kit (Share Perms)

• FILEACL ................ http://www.gbordier.com/gbtools/fileacl.htm
• SUPERCACLS ............. http://www.trustedsystems.com/scacls.htm


GUI

• Domain Assistant ....... http://www.softwareshelf.com/products/domain.asp
• Hyena .................. http://www.systemtools.com/hyena/
• Secure Copy ............ http://www.smallwonders.com/?c=securecopy/welcome
• Security Explorer ...... http://www.smallwonders.com/
• Setup Explorer ......... http://www.admwin.com/umanu_ae.htm
• Setup Batcher .......... http://www.admwin.com/umanu_ab.htm


WHITEPAPERS & TECH DOCUMENTS

• http://www.sans.org/rr/win/NTFS.phphttp://www.jsiinc.com/SUBA/TIP0000/rh0075.htmhttp://www.winnetmag.com/windowsnt20002003faq/Article/ArticleID/15161/windowsnt20002003faq_15161.htmlhttp://www.winnetmag.com/windowsnt20002003faq/Article/ArticleID/14760/windowsnt20002003faq_14760.htmlhttp://support.microsoft.com/?KBID=323275http://support.microsoft.com/?KBID=266083http://support.microsoft.com/?KBID=125996http://support.microsoft.com/?KBID=141589http://support.microsoft.com/?KBID=265704http://support.microsoft.com/?KBID=160513http://support.microsoft.com/?KBID=268546http://support.microsoft.com/?KBID=296865http://www.windowsitlibrary.com/Content/592/toc.html


SCRIPTING SAMPLES

Here's a script to enumerate the permissions of all the
shares on one server:

*** Requires NT4 or higher PLUS Server ResKit ***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 FOR /F "SKIP=4 TOKENS=1*" %V IN ('RMTSHARE \\myserver') DO RMTSHARE \\myserver\%V
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


PERSONAL NOTES

• The version of ROBOCOPY that can duplicate permissions
  is v1.95 or higher. This was first found in the NT4
  ResKit, Supplemental #4. It is also available in the
  Win2K ResKit.

• Also, SCOPY is no longer available in the Win2K ResKit,
  as the appropriate functionality was rolled into Win2K
  version of XCOPY.

• XCOPY in Win2K and later, will copy permissions with
  the /O parameter, but ONLY explicit permsissions. If
  the permissions on the source are inherited from higher
  up in the tree, they will not be copied over to the
  destination (tested with XP/SP1 and 2000/SP3)

• ROBOCOPY does not appear to have this limitation.

• FILEACL is a powerful permissions tool which can be
  used to copy the permissions of a directory tree to
  a file, so that it can be copied back at a later time.

• Several of the scripts below will duplicate file and
  shares from one server to another. Great for replacing
  servers.


RELATED SCRIPTS (ALSO IN THIS ARCHIVE)

• http://KB.UltraTech-llc.com/Scripts/?File=AcctInfo.BAThttp://KB.UltraTech-llc.com/Scripts/?File=CopyShares.BAThttp://KB.UltraTech-llc.com/Scripts/?File=DupPerms-A.BAThttp://KB.UltraTech-llc.com/Scripts/?File=DupPerms-B.BAThttp://KB.UltraTech-llc.com/Scripts/?File=HomeDirs-A.BAThttp://KB.UltraTech-llc.com/Scripts/?File=HomeDirs-B.BAThttp://KB.UltraTech-llc.com/Scripts/?File=HomePerms.BAThttp://KB.UltraTech-llc.com/Scripts/?File=ViewPerms-A.BAThttp://KB.UltraTech-llc.com/Scripts/?File=ViewPerms-B.BAT


RELATED TOPICS (ALSO IN THIS ARCHIVE)

• http://KB.UltraTech-llc.com/?File=Perms.TXThttp://KB.UltraTech-llc.com/?File=SetPerms.TXThttp://KB.UltraTech-llc.com/?File=HomeDirs.TXThttp://KB.UltraTech-llc.com/?File=NewServer.TXThttp://KB.UltraTech-llc.com/?File=Toolkit.TXThttp://KB.UltraTech-llc.com/?File=ResKit.TXT