Assign disk quota to a user

Code:
sudo apt-get install quota
then edit your /etc/fstab .. find the partition you want to put quotas on and add in ursquota and grpquota .. for example
Code:
/dev/hda3       /home           ext3    defaults,usrquota,grpquota        0       2
reboot.. then assuming the partition is hda3
Code:
sudo edquota -u johnsie -f /dev/hda3
make it look like this
Code:
Disk quotas for user johnsie (uid 100):
  Filesystem                   blocks       soft       hard     inodes     soft     hard
  /dev/hda3                         0     31457280     31457280          0        0        0
home my calculations are correct

OK, save that file... now do
Code:
sudo edquota -t -f /dev/hda3
set grace periods to 0 seconds like this
Code:
Grace period before enforcing soft limits for users:
Time units may be: days, hours, minutes, or seconds
  Filesystem             Block grace period     Inode grace period
  /dev/hda3                  0seconds               0seconds
again, save the file... and finally
Code:
quotaoff -a
and..
Code:
quotaon /dev/hda3

โพสต์ยอดนิยมจากบล็อกนี้

ปัญหาและเฉลยธรรม นักธรรมชั้นโท สอบในสนามหลวง พ.ศ. ๒๕๔๓ วันพฤหัสบดี ที่ ๑๖ พฤศจิกายน พ.ศ. ๒๕๔๓

ปัญหาและเฉลยวินัยบัญญัติ นักธรรมชั้นเอก สอบในสนามหลวง พ.ศ. ๒๕๔๓ วันเสาร์ ที่ ๑๘ พฤศจิกายน พ.ศ. ๒๕๔๓

ปัญหาและเฉลยวิชาธรรม นักธรรมชั้นโท สอบในสนามหลวง วันเสาร์ ที่ ๑๙ พฤศจิกายน พ.ศ. ๒๕๔๘