+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 21
Windows Server 2008 R2 Thread, Help! Accidently deleted permissions on our home folders! in Technical; Typical, first day back from half term and I manage to spoon up my home folders... I added a group ...
  1. #1
    ben604's Avatar
    Join Date
    Jan 2010
    Posts
    314
    Thank Post
    81
    Thanked 29 Times in 24 Posts
    Rep Power
    22

    Help! Accidently deleted permissions on our home folders!

    Typical, first day back from half term and I manage to spoon up my home folders...

    I added a group to map the student home folders for the teachers and when I returned, all permissions had disappeared on all the student home folders...

    Is there a quick fix for this? There's a share "Student$" and their folders are named after their usernames, eg 11jonesb.

    I'm sure this question has been asked thousands of times(!!) on this forum, but, looking at the time, I could do with getting this fixed pretty quickly!!

    Any help would be greatly appreciated.

  2. #2
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,480
    Thank Post
    351
    Thanked 261 Times in 213 Posts
    Rep Power
    99
    So in other words you've forced all the folders that allowed individual students access to their own folders to inherit the permissions of the folder above? Is that correct?

    EG: \\server\homeshare\studentfolder1 through to student folder 200 or something, where you changed the settings of "homeshare" so that "studentfolder1-200" all have the same permissions?

    If that's the case i can help you

  3. #3
    ben604's Avatar
    Join Date
    Jan 2010
    Posts
    314
    Thank Post
    81
    Thanked 29 Times in 24 Posts
    Rep Power
    22
    Yeah, I think so. There were no permissions initially, I've had to take ownership again...I've since added us admins with full control and the teacher group with read access. Just need to reinstate the kids permissions on each individual folder now...only 700 of them...

  4. #4
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,480
    Thank Post
    351
    Thanked 261 Times in 213 Posts
    Rep Power
    99
    Ok, pm me your email and i'll send you a folder containing: setacl.exe, an example batch file and a spreadsheet that you can edit (i'll explain what you need to edit) then you can take the concatenated column of the spreadsheet into a batch file to create the permissions for each folder again....it's not exactly quick but it works and might save you some time

    EDIT: if it works out well for you in this instance i might edit it and make a proper help sheet so others can use it. There might be easier ways than this but this was the easiest way that i could find.
    Last edited by mrbios; 8th April 2013 at 04:33 PM.

  5. Thanks to mrbios from:

    tech_guy (9th April 2013)

  6. #5
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,480
    Thank Post
    351
    Thanked 261 Times in 213 Posts
    Rep Power
    99
    Instructions sent, a bit messy but hopefully having left the spreadsheet full of the information i used previously it'll make more sense.

    Oh and ignore my junk about the desktop.ini thing...i don't think that bit actually ever worked haha

  7. #6

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    15,955
    Thank Post
    886
    Thanked 1,700 Times in 1,477 Posts
    Blog Entries
    12
    Rep Power
    448
    Have a search on here there is a script for this

  8. #7
    naysweb's Avatar
    Join Date
    Jan 2009
    Location
    Gloucester
    Posts
    47
    Thank Post
    7
    Thanked 10 Times in 8 Posts
    Rep Power
    13
    We use this all the time.

    http://www.wisesoft.co.uk/software/ntfsfix/default.aspx

    Might help.

  9. #8

    Join Date
    Mar 2007
    Posts
    1,769
    Thank Post
    80
    Thanked 291 Times in 222 Posts
    Rep Power
    86
    Ntfsfix s is the puppy for this one. Use the %username% variable

  10. #9
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,480
    Thank Post
    351
    Thanked 261 Times in 213 Posts
    Rep Power
    99
    Quote Originally Posted by naysweb View Post
    We use this all the time.

    NTFSFix

    Might help.
    How have i not seen this before?! This is awesome!!!

    nice to know the script method i must admit but man that program looks to make it so much easier!

  11. #10
    old_n07's Avatar
    Join Date
    Jun 2012
    Location
    North Staffordshire
    Posts
    98
    Thank Post
    10
    Thanked 16 Times in 14 Posts
    Rep Power
    7
    This script will get the folder contents (directories only) in the share and assuming the folder name is the student's SAM name will add the student with modify permissions to the folder

    **This is untested as I'm at home with no access to AD**

    Code:
    $InitialFolder = "\\server\share$\" #edit to reflect your path but needs trailing \
    
    $Files = Get-ChildItem $InitialFolder -Directory #get content of share
    
    foreach ($file in $files) {
    
    $student = $file.name
    $path = $InitialFolder + $student
    
    icacls $path /grant "$student:`(OI`)`(CI`)M"
    
    }
    HTH

  12. #11
    naysweb's Avatar
    Join Date
    Jan 2009
    Location
    Gloucester
    Posts
    47
    Thank Post
    7
    Thanked 10 Times in 8 Posts
    Rep Power
    13
    Quote Originally Posted by mrbios View Post
    How have i not seen this before?! This is awesome!!!

    nice to know the script method i must admit but man that program looks to make it so much easier!
    We run it every so often, for peace of mind.

  13. #12
    ben604's Avatar
    Join Date
    Jan 2010
    Posts
    314
    Thank Post
    81
    Thanked 29 Times in 24 Posts
    Rep Power
    22
    Thanks for your help guys! I used mrbios' setacls method to get me most of the way there, just didn't propagate the permissions down to the child files/folders...might use that ntfxfix to finish the job.

  14. #13
    mrbios's Avatar
    Join Date
    Jun 2007
    Location
    Stroud, Gloucestershire
    Posts
    2,480
    Thank Post
    351
    Thanked 261 Times in 213 Posts
    Rep Power
    99
    Quote Originally Posted by ben604 View Post
    Thanks for your help guys! I used mrbios' setacls method to get me most of the way there, just didn't propagate the permissions down to the child files/folders...might use that ntfxfix to finish the job.
    Ah that's odd, maybe I've missed a bit off as it should have done (unless it's something to do with the ownership that's causing that problem, as you did mention it not working until you set domain admins in the last column?)

  15. #14

    Join Date
    Jul 2012
    Location
    Boerne Texas USA
    Posts
    45
    Thank Post
    0
    Thanked 9 Times in 9 Posts
    Rep Power
    6
    I have been trying to do more in powershell but I still like cmd shell when it is quick and clean like:
    Code:
    for /D %a in (\\server\share\*) do icacls "%a" /grant %~na:(OI)(CI)M
    The tricky part is the %~na but it just gets the name part of the path. for /? will get you more options/descriptions
    Last edited by jklight; 9th April 2013 at 02:09 PM.

  16. #15

    EduTech's Avatar
    Join Date
    Aug 2007
    Location
    Reading
    Posts
    5,062
    Thank Post
    160
    Thanked 920 Times in 723 Posts
    Blog Entries
    3
    Rep Power
    272
    I have used NTFSFix in the past on many occasions to get people who have done this out of the cr :-) Great tool to keep in your back pocket! :-)

    James.

SHARE:
+ Post New Thread
Page 1 of 2 12 LastLast

Similar Threads

  1. Permissions on Student Home folders
    By kennysarmy in forum Windows
    Replies: 6
    Last Post: 12th December 2011, 01:21 PM
  2. Replies: 4
    Last Post: 1st February 2011, 10:27 AM
  3. Resetting Permissions for Student Home Folders
    By Zoom7000 in forum Windows
    Replies: 11
    Last Post: 5th December 2007, 10:33 AM
  4. Replies: 2
    Last Post: 6th October 2007, 09:46 AM
  5. Replies: 27
    Last Post: 25th January 2007, 03: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
  •