theclave
02-06-2001, 11:46 AM
How do I make it so a specific user is only permitted say 50MB of disk space?
|
Click to See Complete Forum and Search --> : Disk quota theclave 02-06-2001, 11:46 AM How do I make it so a specific user is only permitted say 50MB of disk space? X_console 02-06-2001, 12:00 PM Append the following instructions to your /etc/rc.d/rc.local # Check quota and then turn quota on. if [ -x /usr/sbin/quotacheck ] then echo "Checking quotas. This may take some time." /usr/sbin/quotacheck -avug echo " Done." fi if [ -x /usr/sbin/quotaon ] then echo "Turning on quota." /usr/sbin/quotaon -avug fi fi Next, decide on which partition you want the quota to take effect. I'm assuming this will most likely be in your /home partition. In this case, let's say /home is on hda2. Modify your /etc/fstab such that hda2 includes the "usrquota" option: /dev/hda2 /home ext2 defaults,usrquota 1 1 Next create a /home/quota.user: touch /home/quota.user chown root.root /home/quota.user chmod 600 /home/quota.user Now reboot the system. During bootup you should see that it starts scanning for user quotas. Now to make it so that user Joe only has 50MB quota space, do the following. Type the command "edquota -u joe" (change "joe" with whoever needs the quota of course). You'll see something like this: Quotas for user bob: /dev/hda2: blocks in use: 2594, limits (soft = 5000, hard = 6500) inodes in use: 356, limits (soft = 1000, hard = 1500) Change the "soft" (which is in KB) to the max quota size this user is to have. That's it. Save the file and you're done. Typing "repquota -a" will present you with all the quotas on the system. [ 06 February 2001: Message edited by: X_console ] justlinux.com
Copyright Internet.com Inc. All Rights Reserved. |