I'm trying to set a file system quota for a bunch of users on my system with a command like:

setquota -b /mntpnt < /file/with/quotas

This seems to work for almost all users. However, when I do this:

getent passwd 
  | awk -F: '{ if ($3 >=1000 && $3 < 2000) print $1 }' 
  | xargs quota -u 
  | grep 'none' 
  | awk '{print $5}'

to print the names of those users not having a quota set for them, this pipeline reports two users whose names were included in /file/with/quotas. I even tried setting their quotas manually via a command like:

setquota -u user 1024 1024 0 0 /mntpnt

This reports nothing (as expected) and gives a zero exit status. However, quota -u user still reports that this user has no quota enabled.

As far as I can see there's nothing special about the two rogue accounts that would set them apart.

Can I make setquota more verbose? I tried straceing it but this didn't produce any new information. Any suggestions on why it can be behaving like this?

Kernel quota version: 6.5.1
OS: Debian Squeeze 6.0.1
FS: ext4


I have removed /mntpnt/aquota.user and recreated it with quotacheck -c /mntpnt because I had other reasons to think it was corrupt. All the symptoms described above took place with the brand new aquota.user.


I had a similar problem in the past on ext3. The quota file got silently damaged, and created this odd scenario. Setting that user's quota to zero and back also did not fix it.

The file in question is /path/to/mountpoint/aquota.user.

What we ended up doing was turning off quotas, deleting that file, turning back on quotas and rescaning the system to get the quota data correct again. Since we did this, the problem has not appeared again for over 3 years.

The command to rescan the quote after you do this is quotacheck -cuvf /path/to/mountpoint.

This is really a shock and awe approach. This is really a upstream bug, but after two weeks of trying to fix it, this approach was very reasonable.

| improve this answer | |
  • Thanks for the war story. I probably should have mentioned that this is the first thing I tried. I didn't think it was relevant as all the symptoms persisted after I deleted aquota.user and recreated it. I will update the question. – Joseph R. Apr 14 '14 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.