+ Post New Thread
Results 1 to 10 of 10
Windows Thread, Moving Users home directories and keep the permissions in Technical; We are looking at moving pupils home directories to another set of hard drives on our Windows 2000 Server. I ...
  1. #1

    Join Date
    Oct 2005
    Location
    Hull, East Yorkshire
    Posts
    23
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Moving Users home directories and keep the permissions

    We are looking at moving pupils home directories to another set of hard drives on our Windows 2000 Server. I know that if you just copy or move them to another place then the permissions get screwed.

    Is there a way to copy all the user directories and keep all the permissions!

    Thanks

  2. #2

    Join Date
    Oct 2005
    Location
    Anywhere but in a school ;o)
    Posts
    522
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Moving Users home directories and keep the permissions

    using Xcopy on the command line...

    Do an xcopy /? for all the options - there's loads of flags you can add, but the most important one in this case is /O (copies file ownership and ACL information)

  3. #3

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227

    Re: Moving Users home directories and keep the permissions

    Robocopy is another alternative.
    Or you could use NTBackup.

  4. #4
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109

    Re: Moving Users home directories and keep the permissions

    Quote Originally Posted by Geoff
    Robocopy is another alternative.
    Or you could use NTBackup.
    Robocopy is my favorite I have used it many times for such tasks. I also use it as part of my backups. Just make sure you set the file retry to a sensible limit

  5. #5
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,639
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    23

    Re: Moving Users home directories and keep the permissions

    xcopy <SOURCE_FILEPATH> <DESTINATION_FILEPATH> /e /c /h /o /i /y

    The only problem I've found with this is that it screws up Disk Quotas.
    Quotas work on the Ownership of the file, but the Administrator will own all the moved files so Disk Quota will show them as using lots of space and the users using none, until they create new files which they will then own.

  6. #6
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109

    Re: Moving Users home directories and keep the permissions

    Quote Originally Posted by mrforgetful
    xcopy <SOURCE_FILEPATH> <DESTINATION_FILEPATH> /e /c /h /o /i /y

    The only problem I've found with this is that it screws up Disk Quotas.
    Quotas work on the Ownership of the file, but the Administrator will own all the moved files so Disk Quota will show them as using lots of space and the users using none, until they create new files which they will then own.
    I have a script to sort that using the windows version of chown if you like

  7. #7
    mrforgetful's Avatar
    Join Date
    May 2006
    Posts
    1,639
    Thank Post
    7
    Thanked 15 Times in 15 Posts
    Rep Power
    23

    Re: Moving Users home directories and keep the permissions

    Ooo really?

    Yeh that'd be a great help, at the moment students have a 100Mb limit but some home folders are nearly twice that size.

    What exactly does this script do?
    How long does it take?
    Anything else I should know?

    And thankyou.

  8. #8
    ChrisH's Avatar
    Join Date
    Jun 2005
    Location
    East Lancs
    Posts
    5,007
    Thank Post
    124
    Thanked 286 Times in 263 Posts
    Rep Power
    109

    Re: Moving Users home directories and keep the permissions

    This should be the one

    Code:
    rem sets permission on all files according to home directory name
    
    for /D %%i in (*) do (
    chown -r %%i "%%i\*.*"
    )
    
    pause
    You run it at the same level as your home folders so if you have your year groups in seperate folders you need to run it in each. Of course do a test in a safe location first so you can get the hang of it. It doesnt take very long to run depending on how much data there is. There are also less hoops to jump through than using subinacl and tools like that. Its just simple and works

    The official site seems to be filtered by my RBC for some reason so heres the program.

    Oh and I forgot to add if you use RObocopy in the future it will preserve the file ownership.
    Attached Files Attached Files

  9. #9
    tarquel's Avatar
    Join Date
    Jun 2005
    Location
    Powys, Mid-Wales, UK
    Posts
    1,740
    Thank Post
    13
    Thanked 45 Times in 35 Posts
    Rep Power
    30

    Re: Moving Users home directories and keep the permissions

    Quote Originally Posted by ChrisH
    Oh and I forgot to add if you use RObocopy in the future it will preserve the file ownership.
    ...even to a different HDD, wipe the server and cleanly install, then put the home directories back?

    If so, thats good I need to do the above, tho its all backed up using robocopy and script which i've created from a simple script [thx mark ].

    I use that for backing up the pupil/staff home dirs...

    sorry - i digress

    Nath

  10. #10

    Join Date
    Nov 2005
    Location
    Middlesbrough
    Posts
    402
    Thank Post
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Re: Moving Users home directories and keep the permissions

    Have you tried Microsoft File Server Migration Toolkit?

    I've used it to migrate shares from Windows 2000 to 2003 but you might be able to use it to migrate between 2000 servers.

    FSMT



SHARE:
+ Post New Thread

Similar Threads

  1. Giving user access to all home directories
    By paularmstrong in forum Windows
    Replies: 11
    Last Post: 7th November 2007, 09:27 AM
  2. Replies: 2
    Last Post: 6th October 2007, 10:46 AM
  3. Home Directories on Moodle
    By apeo in forum Virtual Learning Platforms
    Replies: 4
    Last Post: 13th June 2007, 12:20 PM
  4. Replies: 2
    Last Post: 27th April 2007, 07:41 AM
  5. Replies: 27
    Last Post: 25th January 2007, 04:42 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
  •