DSapseid Posted May 18, 2007 Posted May 18, 2007 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
bishopsgarthstockton Posted May 18, 2007 Posted May 18, 2007 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
fooby Posted May 18, 2007 Posted May 18, 2007 http://www.wisesoft.co.uk (i think) its a utility called NTFSFix and in a shiny GUI does this. fooby 2
bishopsgarthstockton Posted May 18, 2007 Posted May 18, 2007 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.
fooby Posted May 18, 2007 Posted May 18, 2007 http://www.edugeek.net/index.php?name=Forums&file=viewtopic&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 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 :D fooby 1
fooby Posted May 18, 2007 Posted May 18, 2007 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
bishopsgarthstockton Posted May 18, 2007 Posted May 18, 2007 So xcacls can be used to change permissions?
tarquel Posted May 18, 2007 Posted May 18, 2007 I've been using cacls for years - havent tried xcacls tho lol Nath.
bishopsgarthstockton Posted May 18, 2007 Posted May 18, 2007 just trying to think what i used it for the other week
bishopsgarthstockton Posted May 18, 2007 Posted May 18, 2007 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
bishopsgarthstockton Posted May 18, 2007 Posted May 18, 2007 here is the bat file i created the other week. any tips on how i could have done it better?qca_folder__permissions_script_cr1.txt 1
DSapseid Posted May 18, 2007 Author Posted May 18, 2007 fooby In your script if i leave the /p out wil it just add it to any existing settings?? Cheers Dan
NetworkGeezer Posted May 18, 2007 Posted May 18, 2007 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.
fooby Posted May 21, 2007 Posted May 21, 2007 @DSapseid /P - Wipe existing settings and set what the script says /G - Add to the existing settings that are already set. Please dont shout if i have these wrong - please check this before using but afaik this is whats what - as i say i use NTFSfix coz shiny GUI's win me over all the time. fooby
srochford Posted May 21, 2007 Posted May 21, 2007 cacls will do most things. a key switch is "/e" - this edits the existing list. eg: cacls d:\home /e /t /g "special group":c will give the group called "special group" change (ie "modify" if you're used to the Windows GUI) permissions on every folder under d:\home. The /t switch says "work down the tree" and the /g means Grant. if you left out the /e then this command would prompt "are you sure" - the correct answer to that is "no" :-) because it will wipe all existing permissions and leave only "special group" with change perms. Dummy folders (or even virtual servers) are great for this sort of thing - you can try it all out without risk of buggering things up!
DSapseid Posted May 22, 2007 Author Posted May 22, 2007 fooby can you do me a favour and upload the NTFSfix somewhere as bloody websens blocks all the pages that i try and download it from Cheers Dan
FatBoy Posted February 26, 2009 Posted February 26, 2009 WiseSoft - Resources for IT Professionals (i think) its a utility called NTFSFix and in a shiny GUI does this. fooby Thanks for this fooby, I'm going to try it later with a problem I have with permissions if it works its will save me a lot of time
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now