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

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

I miss you all กับ I miss all of you ต่างกันอย่างไร

ปัญหาและเฉลยวิชาธรรม นักธรรมชั้นตรี สอบในสนามหลวง วันอังคาร ที่ ๒๙ กันยายน พ.ศ.๒๕๕๒

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