+ Post New Thread
Results 1 to 5 of 5
Windows Server 2008 R2 Thread, Correcting file and folder ownership in Technical; We've recently moved our file server to a new one using Robocopy. I thought i'd used all the right tags ...
  1. #1

    Join Date
    Mar 2007
    Location
    Devon
    Posts
    1,042
    Thank Post
    226
    Thanked 63 Times in 56 Posts
    Rep Power
    30

    Correcting file and folder ownership

    We've recently moved our file server to a new one using Robocopy. I thought i'd used all the right tags to retain the ownership as well as permissions but it appears not. This is now confusing FSRM with quotas and reporting.

    I dont really want to have to go through each user 1 by 1 to correct the ownership, is there a quicker way?

  2. #2

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    2,827
    Thank Post
    146
    Thanked 573 Times in 517 Posts
    Rep Power
    154
    Yup - chown.exe. Run it from the root folder, with the script:

    Code:
    rem sets permission on all files according to home directory name, place this and chown.exe into the \userhome$ folder then run it.
    
    for /D %%i in (*) do (
    chown -r %%i "%%i\*.*"
    )
    This will change the owner of each folder to the name of the folder (if your syntax differs, change as appropriate). Takes a while, but this makes FSRM work fine for me!

  3. Thanks to 3s-gtech from:

    dave.81 (21st May 2012)

  4. #3

    Join Date
    Mar 2007
    Location
    Devon
    Posts
    1,042
    Thank Post
    226
    Thanked 63 Times in 56 Posts
    Rep Power
    30
    Brilliant! I'll have a look at that later today. So just to confirm our folder structure is homeshare$\staff\username, i run this from the staff folder it'll then do each folder within this?

  5. #4

    3s-gtech's Avatar
    Join Date
    Mar 2009
    Location
    Wales
    Posts
    2,827
    Thank Post
    146
    Thanked 573 Times in 517 Posts
    Rep Power
    154
    Yeah that's it. You can download chown from http://wwwthep.physik.uni-mainz.de/~frink/chown.zip, it's old but works fine.

  6. Thanks to 3s-gtech from:

    dave.81 (21st May 2012)

  7. #5

    Join Date
    Mar 2007
    Location
    Devon
    Posts
    1,042
    Thank Post
    226
    Thanked 63 Times in 56 Posts
    Rep Power
    30
    Thanks! Saved me hours of work.

SHARE:
+ Post New Thread

Similar Threads

  1. replacing files and folders ownership in home drives
    By Bertv in forum Windows Server 2000/2003
    Replies: 4
    Last Post: 17th November 2011, 01:01 AM
  2. Empty files and folders on a shared area
    By ranj in forum Windows
    Replies: 6
    Last Post: 6th January 2009, 12:11 PM
  3. Mass Copy of Files and Folders
    By originofsymmetry in forum Scripts
    Replies: 6
    Last Post: 2nd October 2007, 12:16 PM
  4. Restrict "Search files and folders"
    By sandfie in forum Windows
    Replies: 4
    Last Post: 26th March 2007, 10:45 PM
  5. Replies: 4
    Last Post: 15th November 2006, 03:19 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •