Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

An easy method of creating disk quotas for users System
I had been trying to setup disk quotas on an iMac with multiple users. I had been asking around, and no one could tell me an easy way other than partitioning the HD for each user. This would be easy, but what if I want to add more users or delete users and reallocate the free space? So I have found the solution, which was there the whole time I had been searching.
  1. Download Webmin and install it on the machine on which you wish to enable quotas. It might be a little difficult for some people, but just read the instructions and you will have no problems.
  2. Login to Webmin, click on the System button, then click on the Disk quotas button.
  3. Choose the filesystem where you want disk quotas enabled, and click the Enable Quotas link. Then choose users and set your quotas.
Optional: If the users exceed their limits, do you want to give them a grace period to backup and delete some data? This is good in educational situations.

Using webmin, I was able to set up disk quotas for five users in less than 10 minutes.

[robg adds: I'm sure someone will volunteer the command-line solution to this problem, but Webmin seems like an easy way to accomplish the same results. We've run a few hints about Webmin in the past (Original hint, Revised original hint, Secure Webmin with SSL) ... if you haven't checked it out, it's well worth a look.]
    •    
  • Currently 2.67 / 5
  You rated: 4 / 5 (3 votes cast)
 
[18,237 views]  

An easy method of creating disk quotas for users | 6 comments | Create New Account
Click here to return to the 'An easy method of creating disk quotas for users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An easy method of creating disk quotas for users
Authored by: Anonymous on Jul 18, '03 12:55:44PM

For the command-line method, see the commands

edquota(8) - edit user quotas
quota(1) - display disk usage and limits
quotacheck(8) - filesystem quota consistency checker
quotactl(2) - manipulate filesystem quotas
quotaon(8), quotaoff(8) - turn filesystem quotas on and off
repquota(8) - summarize quotas for a file system

(as given by man -k quota)

---
--
Thomas Deniau



[ Reply to This | # ]
An easy method of creating disk quotas for users
Authored by: ColonelPanic on Jul 19, '03 02:18:30PM

Just a thought, but why not set up .dmg disk images for each user (changing each users home folder location with one of the many methods available on this site). That way, each user is limited to the size of the disk image. You can also encrypt the disk image - though I'm not entirely sure you could make it automounting - that would require access to the keychain, which would be _inside_ the disk image... but worth exploring.



[ Reply to This | # ]
user folders on .dmg
Authored by: VRic on Jul 20, '03 01:42:44PM

This is exactly what I was about to suggest, with the added comment that since OSX follows aliases even INSIDE disk images (found that long ago, don't remember if a hint was posted already), this method should work in yet unsuspected situations. Like, maybe, keeping the existing users folders where they are but replacing their subfolders with aliases pointing inside disk images elsewhere (allowing distinct quotas for Music and Documents? Easing backup of users stuff? Combine with "real" quotas to minimize usage of the boot volume and store user data to other locations?)

I'm not sure how well this would work, but it seems worth trying.



[ Reply to This | # ]
An easy method of creating disk quotas for users
Authored by: wrwjpn on Jul 20, '03 07:31:58AM

The CLI method only works if you install the system with disk quotas enabled. Which I think the average user doesn't know how to do. When I installed from the CD that came with my imac I was not able to choose this as an option. If someone could tell me how to install 10.2 with disk quotas enabled I would greatly appreciate it.

Bill



[ Reply to This | # ]
An easy method of creating disk quotas for users
Authored by: mule on Jul 21, '03 04:22:21AM

..and just another note. Webmin can also be found in Fink (http://fink.sf.net).

This might make it easier for some people to install your suggested software solution.



[ Reply to This | # ]
An easy method of creating disk quotas for users
Authored by: sjonesy8 on Jul 14, '05 04:59:56PM

I'm having problems installing webmin. I've downloaded the webmin-1.210.tar file, but I don't know where to go from there. I've got one share that I want to set up disk quotas on and I can't figure out how to get webmin installed correctly in order to enable the quotas and enforce them. Please help me out.

Thanks.



[ Reply to This | # ]