+ Post New Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
Scripts Thread, Permisions Script in Coding and Web Development; Hi guys I need to add a new group to have permissions over all the students home areas and every ...
  1. #1
    DSapseid's Avatar
    Join Date
    Feb 2007
    Location
    West Sussex
    Posts
    1,153
    Thank Post
    130
    Thanked 54 Times in 47 Posts
    Rep Power
    38

    Permisions Script

    Hi guys

    I need to add a new group to have permissions over all the students home areas and every time i try and do it in with the explorer menu thing it just crashes. I know you can do it in a script as i have others that do other things.

    "for /d %%1 in (*) do echo y|cacls %%1 /t /g %%1:f administrators:f system:f"

    "
    for /d %%1 in (*) do "C:\Program Files\Windows Resource Kits\Tools\subinacl.exe" /subdirectories "D:\Data\Home\Intake02\%%1\*.*" /setowner=mcc\%%1"

    These are the two that i currently have. I want to add a group called staffviewing to the properties so the ICT staff can view the kids work when they forget to email it to the teacher!! I want the group to have write, modify etc. but not full control.

    Cheers

    Dan

  2. #2

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    I have always wanted to know how to do this aswell. If any one knows any web links can explains how to do this, i would be most greatfull

  3. #3
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    Re: Permisions Script

    www.wisesoft.co.uk (i think)

    its a utility called NTFSFix and in a shiny GUI does this.



    fooby

  4. 2 Thanks to fooby:

    FatBoy (26th February 2009), wesleyw (26th February 2009)

  5. #4

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    Cheers for that fooby

    but I would love to know how its done manualy, using a script. I've only just started getting in to using command line to do jobs.

  6. #5
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    Re: Permisions Script

    ok i have one on here that you can mash up - 2 secs

  7. #6

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    smooth

  8. #7
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    Re: Permisions Script

    http://www.edugeek.net/index.php?nam...ewtopic&t=3203

    This is a link to another forum thread I put here a while ago, it is designed to copy a file to each folder, however it does most of what you want by giving you the ability to do a task to many folders repetitively.

    part2.cmd
    Code:
    if %2==bytes GOTO :End
    xcacls %1\%2 /P domain\Administrator:F /E /Y /T
    xcacls %1\%2 /G domain\%2:F /E /Y /T
    xcacls %1\%2 /G domain\Staff:F /E /Y /T
    xcacls %1\%2 /G "domain\Domain Admins":F /E /Y /T
    :End
    Explannation of lines
    1 - if %2 is blank then quit. %2 will be the name of the folder gathered from script
    2 - Replace permissions (thats the /P switch) and give administrator full
    3 - Grant access (thats the /g) to domain\%2 therefore the foldername
    4 - thats granting access for a group
    5 - thats access for a group with a space in the name.


    this is assuming the foldername is the same as the username
    for example

    10203 - owned by user 10203
    10204 - owned by user 10204
    10205 - owned by user 10205

    i think i explaned how to use it in the other thread also - any q's post back and ill help - otherwise good luck investigating

    fooby

  9. Thanks to fooby from:

    wesleyw (26th February 2009)

  10. #8
    fooby's Avatar
    Join Date
    Dec 2005
    Posts
    351
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    19

    Re: Permisions Script

    the script i have posted will give full control - there is little difference between write + modify and full control as far as i have seen.

    It does seem that the scripts that were first posted seem to do similar to what mine did - but the ones i used are in 2 parts and are good to use for other things.

    Also takeown.exe (from windows resource kits) is useful for owner things

  11. #9

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    So xcacls can be used to change permissions?

  12. #10
    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
    29

    Re: Permisions Script

    I've been using cacls for years - havent tried xcacls tho lol

    Nath.

  13. #11

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    just trying to think what i used it for the other week

  14. #12

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    doooh, i used it to change permissions on some folders the other week, how blooming daft am i for forgeting i had used it.... I tell ya im def losing the plot

  15. #13

    Join Date
    Nov 2006
    Posts
    547
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    here is the bat file i created the other week. any tips on how i could have done it better?
    Attached Files Attached Files

  16. Thanks to bishopsgarthstockton from:

    wesleyw (26th February 2009)

  17. #14
    DSapseid's Avatar
    Join Date
    Feb 2007
    Location
    West Sussex
    Posts
    1,153
    Thank Post
    130
    Thanked 54 Times in 47 Posts
    Rep Power
    38

    Re: Permisions Script

    fooby

    In your script if i leave the /p out wil it just add it to any existing settings??

    Cheers

    Dan

  18. #15

    Join Date
    Feb 2006
    Posts
    1,187
    Thank Post
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Re: Permisions Script

    Quote Originally Posted by bishopsgarthstockton
    here is the bat file i created the other week. any tips on how i could have done it better?
    I can't remember the switches fro XACLS off hand but you can save yourself alot of typing by using permission inheritance from the TDS folder.

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

Similar Threads

  1. Help with KIX script please
    By salan in forum Windows
    Replies: 8
    Last Post: 8th November 2007, 06:55 PM
  2. Best script ever!
    By Zabu in forum Scripts
    Replies: 0
    Last Post: 6th November 2007, 11:48 PM
  3. Logon script & Printer script question.
    By Galway in forum Windows
    Replies: 3
    Last Post: 29th August 2007, 11:00 AM
  4. Does anyone have a script...
    By wesleyw in forum Scripts
    Replies: 4
    Last Post: 5th July 2007, 01:58 PM
  5. AUP Script thats not quite good enough
    By Pear in forum Scripts
    Replies: 8
    Last Post: 28th September 2006, 07:21 AM

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
  •