Setting and Enforcing Disk Usage Quotas

Remember those users from earlier in the chapter who wouldn’t stop uploading files and forced you to buy a new disk to accommodate them? Suppose you decided that you didn’t want any single user to be able to use more than 100MB without special permission from you. You can set this limit with quotas.

Quotas are not built into the GENERIC kernel. To enable them, you have to add the following line to your custom kernel configuration file (/usr/src/sys/i386/conf/CUSTOM, copied from GENERIC, as discussed in Chapter 18):

options      QUOTA

See “Creating a Custom Kernel Configuration File,” in Chapter 18 for information on building a custom kernel. You also can make use of a couple switches in /etc/rc.conf to enable ...

Get FreeBSD6 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.