I am getting 'disk quota exceeded' error but the partition is not full and user has unlimited quota. What is wrong and how can I fix it?

xxx@mc:/tmp$ pyenv install 3.7.6
/home/xxx/.pyenv/plugins/python-build/bin/python-build: line 2048: cannot create temp file for here-document: Disk quota exceeded
mkdir: cannot create directory ‘/tmp/python-build.20220629235336.143991’: Disk quota exceeded

BUILD FAILED (Ubuntu 20.04 using python-build 20180424)

Inspect or clean up the working tree at /tmp/python-build.20220629235336.143991

xxx@mc:/tmp$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            445M     0  445M   0% /dev
tmpfs            98M 1016K   97M   2% /run
/dev/sda         19G   11G  7.5G  58% /
tmpfs           489M     0  489M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           489M     0  489M   0% /sys/fs/cgroup
/dev/sdc        4.8G   20M  4.7G   1% /baks
tmpfs            98M     0   98M   0% /run/user/0

xxx@mc:/tmp$ quota -u
Disk quotas for user xxx (uid 1000): none
  • 1
    Are there group quotas in effect? Check with quota -g.
    – Kusalananda
    Jun 30, 2022 at 10:41
  • Thanks Kusalananda, that was the problem. Jun 30, 2022 at 12:31

2 Answers 2


The point of quotas is to avoid running out of disk space, so it makes sense that they restrict disk usage before the disk is full.

Quotas can be set on users, but they can also be used to limit the collective storage space used by a group of users.

In your case, you show that there is no user quota in effect.

Group quotas are viewed with quota -g, and according to comments, this seems to be what's causing your issue. It's additionally slightly odd that the /tmp directory is not its own tmpfs filesystem on the system you're connected to.


Hit the same issue. 'quota -su; df /tmp' confirms that I am hitting user quota in /tmp and it is not full, but 'find /tmp -user $USER' comes up empty, and 'quota -sg | grep < tmp mount >' finds no group quota involved. So I don't know why the system says my tmp quota is exceeded.

I found a work-around: change the location of my bash temp files.

$ mkdir -p ~/tmp
$ export TMPDIR=~/tmp
$ echo "export TMPDIR=~/tmp" >> ~/.bashrc

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .