Solved

Copy share with heavily customised permissions

Posted on 2011-02-17
6
1,100 Views
Last Modified: 2012-05-11
Hi there, just wondered if anyone had some suggestions for this: I'd like to move a share to a new sever but this share is enormous with about 50 users that's been using it heavily and NTFS permissions on sub-folders have been modified a lot over the last 5 years.  Consequently the domain admin account I'm using doesn't have permissions on all the sub-folders.

I usually use robocopy but I can foresee running the script only to find multiple folders that I don't have permission to read, then having to go to each one individually and changing owner to myself, then adding in permissions for this account, only to kick off the robocopy script again and find sub-folders deeper in the hierarchy that I still can't read, and so on.

Anyone aware of a way that I can change owner of all the files to myself, then append a permission without replacing permissions completely?

Thanks!
0
Comment
Question by:ebooyens
6 Comments
 
LVL 7

Accepted Solution

by:
_Tyrant earned 250 total points
ID: 34914715

Hi ebooyens,

Glad to see you're using robocopy for this. I've run into similar scenarios in the past, and it was a real life saver. I've also had to work with odd one-off permissions issues like this before. Typically, I would run the following command from the command prompt:

# cacls FOLDER_NAME /T /C /E /G USERNAME:F

This will change the ACLs for the folder, all sub-folder, and all sub-files. Essentially, it will recursively (/T) edit the ACLs (/E), regardless of access denied (/C) errors, to grant (/G) the given user full (:F) permissions.

However, I fear that you could run into another issue here just based on what you have described. If the owner of the sub-folders is not a group which your domain admin account lives in (provided that the account also does not have any permissions) you will not be able to modify the ACLs.

To correct this issue, simply do the following from the Windows Explorer:

# Right click on the parent folder
# Select 'Properties'
# Select the 'Security' tab
# Click the 'Advanced' button
# Select the 'Owner' tab
# In the 'Change owner to' field, select Administrators, Domain Admins, or your active user account
# Select the 'Replace owner on subcontainers and object' checkbox
# Click 'OK'
# Click 'OK'

This will likely take some time, however, once the process is completed, the owner of all sub folders and files will be set to the account you referenced above. You will now be able to run the cacls command from the command prompt, allowing you to grant full permission to a domain admin account, thereby allowing you to copy all of the files and folders with robocopy.

I hope this is the information you're looking for.

Good luck!
0
 
LVL 4

Expert Comment

by:h3nnys
ID: 34914769
Right click folder and go to sharing and security

click on Security TAB and then click advanced

select admin account and give it permission to that folder

once you have done that select the tickbox that says "Apply these settings to all sub folders and containers..." click ok

then select the tickbox that says " replace permissions on all child objects...." click apply and then ok

This should effectively give your Domain Admin account permissions to ALL folders and subfolders

0
 
LVL 4

Author Comment

by:ebooyens
ID: 34914936
Thanks Tyrant, that sounds exactly like what I'm after, we'll try it and award points if it works

h3nnys, that's exactly what I don't what to do that as that will get rid of all the custom security that's been done on sub-folders and replace it with parent permissions.  Thanks anyway.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
LVL 7

Expert Comment

by:David_Hagerman
ID: 34914992
You can also use the xcopy command with the /o option.

Map a network drive the new server and use this command
xcopy (folder you want to move) (destination folder) followed by /o swtich

xcopy test v:test /o

ACL's are copied to the new machine
0
 
LVL 5

Assisted Solution

by:chqshaitan
chqshaitan earned 250 total points
ID: 34915356
You can use robocopy with the /zb option, this way if it fails to access a directory it will fallback into backup copy mode. Ideal for this situation.

http://en.wikipedia.org/wiki/Robocopy
0
 
LVL 4

Author Closing Comment

by:ebooyens
ID: 34938351
Apologies for not accepting a solution sooner, I haven't been able to test these but from what I've read both these solutions will work, Tyrant's solution was what I what was looking for but if chqshaitan's works it will be simpler and faster.  I'll report back when I eventually get round to testing.  Thanks again!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

861 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