How can I set a limit as to how much space is available for a web site I put on my server? Like it is limited to 50 MB of space.

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Mon, 2006-08-07 15:39. :: Linux

First, you have to enable quota on your system. Have a look at the quota section of the appropriate "Perfect Setup" tutorial for your distribution on HowtoForge.

After you've enabled quota on your system:

To set quotas for a user or group, use the setquota command (see

man setquota

for more information), e.g.:

setquota -g $group $blocks $blocks 0 0 -a
setquota -u $username $blocks $blocks 0 0 -a

Replace $group, $username and $blocks. Note: $blocks is the quota size in MB * 1024! To deactivate quotas for a user or group, run these commands and set $blocks to 0.


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.