I executed it, I believe, correctly as it seemed to be working, however, I checked the permissions and the user still had full rights instead of change. Here is how I executed it:
SetPerm "E:\MS\GMS\Users" "STUDENTS" C
Is this correct?
Hello Everyone,
We are a large school district with approx 15,000 students. When you create a home directory via ADUC, it gives the user full permissions. I need a script which will enumerate the directories, which are the same as their logon name, and change their permissions from full to modify.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
What I normally do is reset the permissions to administrators full on the top folder and under advanced check replace permissions on all child objects and uncheck inherit from parent. This fixes everything so only administrators have access to all user folders, then I run the script to add the users permissions.
When you are done testing are you turning inheritence back on for the folders?
Just to clarify, if your top folder is E:\MS\GMS\Users after you run the script inheritence is off for the user folders, correct? So for User1, properties show inheritence off, but if you go to a sub folder of User1 it is back on, correct?
And you want to have inheritence turned on from the Top USERS folder? What are the permissions of the top USERS folder?
All the permissions are correct, except changing the user from Full to Modify?
I have an idea I am testing to make this work for you, but I want to verify everything 1st
First of all, I really appreciate the work on your part.
Basically, we have computer teachers and the parent directory who manage the students in their building. That's why I need to have the students home directory to continue to have inheritance (in case we have to change teachers) from the top users folder. So, if my home folder is e:\ms\gms\users\jstudent, I should only have change rights and have the permissions flow from e:\ms\gms\users directory through my folders. That being said, all the permissions are fine as they are, we only need to change the students permissions in their home folder from full to change and leave everything else the same.
Hope this helps.
Business Accounts
Answer for Membership
by: rlandquistPosted on 2009-08-20 at 12:13:36ID: 25146024
Save this script as SetPerm.cmd
Run it from a command line on the server where the user folders are.
setperm.cmd "F:\USERDATA" DOMAIN C
This will give the administrators group Full and the user Modify
Select allOpen in new window