Adding Quotas to Linux operating System

Activate Quotas in kernel:
File systems ---> Quota support
[*] Quota support
<*>    Old quota format support
<*>    Quota format v2 support

emerge quota

rc-update add quota boot

Add quota to the partition in /etc/fstab

/dev/hde1  /quota   ext2   usrquota,grpquota   1  1


Add quota data files:
# touch /quota/aquota.user
# touch /quota/aquota.group
# chmod 600 /quota/aquota.user
# chmod 600 /quota/aquota.group


Set soft-limit to 100kb and hardlimit to 200kb on /quota mountpoint
setquota -u mike 100 200 0 0 /quota/

You can also edit quotas with :

edquota -u mike

The manual adviced me to run : quotacheck -avug, once a week but i failed to figure out why. It seems to work just fine for me without.

 

Dette indlæg blev udgivet i Knowledge Base, Linux, Old Base. Bogmærk permalinket.

Skriv et svar