+ Post New Thread
Results 1 to 5 of 5
Scripts Thread, Home Drive Permissions in Coding and Web Development; Hi All, My server that host my homes drives stuffered some serious problems last night meaning I had to take ...
  1. #1
    RobD's Avatar
    Join Date
    Mar 2007
    Posts
    98
    Thank Post
    0
    Thanked 8 Times in 8 Posts
    Rep Power
    16

    Home Drive Permissions

    Hi All,

    My server that host my homes drives stuffered some serious problems last night meaning I had to take ownership of all the home drives and copy them to a new server.

    The problem I have is all the permissions seem to have broken, so the plan is to re-set all the permissions with something like subinacl etc.

    Would the below work:

    Code:
    for /D %%i in (*) do ( subinacl /file %%i /grant=yourdomain\%%i=C "/grant=yourdomain\domain admins=f" /grant=yourdomain\AreaViewer=c /setowner=yourdomain\%%i 
    
    subinacl /subdirectories %%i\* /grant=yourdomain\%%i=f "/grant=yourdomain\domain admins=f" /grant=yourdomain\AreaViewer=r /setowner=yourdomain\%%i  )
    If so would I just need to naviagte to the folder in cmd and run the script?

  2. #2

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,758
    Thank Post
    825
    Thanked 1,662 Times in 1,447 Posts
    Blog Entries
    11
    Rep Power
    441
    In the past i have used this and its worked a treat

    Code:
    for /D %%i in (*) do (
       cacls %%i /T /E /G DOMAIN\%%i:c
    )

  3. #3
    RobD's Avatar
    Join Date
    Mar 2007
    Posts
    98
    Thank Post
    0
    Thanked 8 Times in 8 Posts
    Rep Power
    16
    Hi,

    Thanks where can I download Cacls from?

    Also what permissions will this assign? Could I add Domain Admins etc??
    Thanks

  4. #4

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,758
    Thank Post
    825
    Thanked 1,662 Times in 1,447 Posts
    Blog Entries
    11
    Rep Power
    441
    Erm i got mine from some site on google, shouldn't be hard to find.

    This will do users only. Assuming your folders are named the same as the usernames. Just setup the other permissions normally and this will do the awkward bits.

  5. #5
    RobD's Avatar
    Join Date
    Mar 2007
    Posts
    98
    Thank Post
    0
    Thanked 8 Times in 8 Posts
    Rep Power
    16
    Is there any chance you could send me the file? I'm struggling to get hold of it and the original code I posted results in:

    1337 The security ID structure is invalid.

SHARE:
+ Post New Thread

Similar Threads

  1. Easiest way to set NTFS permissions on home drives?
    By ihaveaproblem in forum Windows Server 2008 R2
    Replies: 3
    Last Post: 20th July 2012, 11:09 PM
  2. Best set up for new users - Home drive permissions and shares?
    By reggiep in forum Windows Server 2008
    Replies: 11
    Last Post: 5th May 2011, 03:01 PM
  3. Home drive size limits - what are yours?
    By tarquel in forum Wireless Networks
    Replies: 45
    Last Post: 16th July 2008, 09:58 AM
  4. Moving Shared Folders and Home Drives
    By secman in forum Windows
    Replies: 4
    Last Post: 31st August 2006, 08:23 PM
  5. Replies: 2
    Last Post: 1st October 2005, 02:55 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
  •