Jump to content

Disk usage (in disk Quota Window) not dispalying correctly - Windows 2008 R2 Server


Recommended Posts

Posted

have an issue at one of my schools, where disk quota's have been set on students home folder, but one of the tech's inadvertantly removed the 'deny write permission when quota has been reached' option. Some of the kids very quickly realised this, and loaded/saved all sorts of pictures/music etc etc.. and each kids user area swelled to 3/4gb.

 

Luckily, I spoted this quite early on, and re-inforced the deny write permission. I also deleted what were obviously non work related files. However, the problem now is that even thou I deleted the big files/folders, the 'used disk space' (in the disk quota window) is still showing 3/4gb for the effected student, so he/she still cannot save.

 

Browsing through various website, I find that one of the reasons could be that disk quota is associated with the owner of the file/folder, and by me deleting those files (as an administrator) from the users home folder, I have taken ownership. The work around is to make the student the owner again (choosing the option to apply the change to all subfolders and objects), then refreshing the disk quota window. I did this for one student (and thought it worked, but I was wrong) it didn't work.

 

 

 

Any idea's? Anyone?

Posted

Ownership would certainly be my guess, and it's pretty easy to do a sweep of that anyway. Use a little command line utility called chown with the batch file:

 

for /D %%i in (*) do (

chown -r %%i "%%i\*.*"

)

 

Pop this .cmd with chown.exe into the root of your students' home directories (though this will only work if they're in one flat directory for all year groups etc) and execute it. It will change the ownership of every folder to the user name of the folder, takes a little while though.

 

Edit: even FSRM needs the ownership to be correct.

  • Thanks 1
Posted

I've manually changed the permissions on one paticular folder it didn't seem to work. I can certainly chown.exe, but I wanted to be clear how the batch file will work.

 

once I've created .cmd and placed it in the root of the student home folders along with chown.exe, which has the following structure

 

volume name: StudentDocs

08StudentA

folder x, folder y, file x, file y

 

09StudentB

folder x, folder y, file x, file y

10StudentC

folder x, folder y, file x, file y

 

it will then go ahead and change the ownership of 08StudentA and all its files and subfolders to username 08StudentA. Sorry to sound apprehensive, its a 1000 students in one big hit. If it goes wrong, and kids can't access their work, the ICT teachers will hang the Techs.

 

I might try it with a couple of accounts first to see if it works. Thanks in advance to clarifying thou.

Posted
I've manually changed the permissions on one paticular folder it didn't seem to work. I can certainly chown.exe, but I wanted to be clear how the batch file will work.

 

once I've created .cmd and placed it in the root of the student home folders along with chown.exe, which has the following structure

 

volume name: StudentDocs

08StudentA

folder x, folder y, file x, file y

 

09StudentB

folder x, folder y, file x, file y

10StudentC

folder x, folder y, file x, file y

 

it will then go ahead and change the ownership of 08StudentA and all its files and subfolders to username 08StudentA. Sorry to sound apprehensive, its a 1000 students in one big hit. If it goes wrong, and kids can't access their work, the ICT teachers will hang the Techs.

 

I might try it with a couple of accounts first to see if it works. Thanks in advance to clarifying thou.

 

That's how it works for us. The script came from here, so I know others have used it. See if you can create a test case in a separate directory first to be sure, naming a couple of folders to match some accounts.

 

Not heard of folder-level quotas, makes sense though.

Posted

ok, that worked fine. Thank you.

 

The student on who's account I manually tried and didn't work was becuase I created a new folder on the same volume called Prohibited_data, and moved his contents. As I didn't take ownership of the files that I moved, his quota remained the same. The quota got adjusted when the file ownership was changed.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...