Copy NTFS permissions from 1 folder to another

I have a folder that holds each of my user's data (%usernam%). I want to copy thos NTFS permissions as well as ownership of folders to another folder that has the same users but different data. Here is the example:

Folder A\%username%
copy all NTFS permissions including folder ownership to:
Folder B\%username%

What is the best way to go about doing this?
lenivanAsked:
Who is Participating?
 
madison perkinsConnect With a Mentor Network AdministratorCommented:
xcalcs will read and display the ntfs permissions of a folder.  you can then use xcalcs to edit/grant/deny/replace the permissions as well as ownership of files and/or folders contained within another folder.  I was able to do what you are looking for from the command line with xcalcs.vbs.  the gui worked for everything but the ownership portion.  

I was not able to find something that will look at one folder, read the rights then apply it to another folder.  it is possible and there may be an app out there that will but i was unable to find it.  
0
 
hlarseCommented:
Robocopy has this ability, to preserve NTFS permissions when copying.

http://en.wikipedia.org/wiki/Robocopy
It's part of the resource kit http://www.microsoft.com/Downloads/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

Something like this:
robocopy source destination /COPYALL
0
 
lenivanAuthor Commented:
To be clear...

I DO NOT want the copy the folder or its contents. I only want to copy the permissions. Will robocopy still work?
0
Managing Security Policy in a Changing Environment

The enterprise network environment is evolving rapidly as companies extend their physical data centers to embrace cloud computing and software-defined networking. This new reality means that the challenge of managing the security policy is much more dynamic and complex.

 
madison perkinsNetwork AdministratorCommented:
get the server 2003 resource kit and use xcopy.exe in conjunction with permcopy.exe.  use xcopy /? and permcopy /? to get the proper command line switches.  with these two tools you can do excactly what you want.
0
 
madison perkinsNetwork AdministratorCommented:
hmmm.  just read your reply.  so you want to read the ntfs permissions from one folder and apply those ntfs permissions to another folder that already exists.  I know how to apply specific ntfs permissions to a folder with a script but not sure about reading them.  
0
 
madison perkinsNetwork AdministratorCommented:
it may take a little time to get running but this might work.  
http://support.microsoft.com/default.aspx/kb/825751
0
 
madison perkinsNetwork AdministratorCommented:
here is a GUI for xcalcs.vbs script.  I am testing your senario right now.

http://www.sh-soft.com/front_content.php?idcat=19&lang=1&client=1
0
 
hlarseCommented:
I don't believe robocopy will do what you want.  Sorry about the confusion.
0
 
lenivanAuthor Commented:
madperk, so I am unable to copy ownership info from 1 folder and apply it to another?
0
 
ziad270Commented:
Setacl (sourceforge project)  is able to do that.
http://setacl.sourceforge.net/html/examples.html

I just tested it successfully. From subfolder 1 to another subfolder 2 somewhere else

setacl -on "Folder1\Subfolder1" -ot file -actn list -lst "f:sddl;w:d,o" -bckp "E:\Listing.txt"

Then edit the listing.txt   "Folder1\Subfolder1" -->   "Folder2\Subfolder2"

and :

setacl -on "folder2\Subfolder2" -ot file -actn restore -bckp "E:\Listing.txt"

Your done...
0
All Courses

From novice to tech pro — start learning today.