26

I am using Debian Squeeze. Suddenly I have started facing a problem that my user is not able to make directories and other such tasks. Running mkdir abc gives me

mkdir: cannot create directory 'abc': Disk quota exceeded

My hard disk is not full df -h results are

Filesystem            Size  Used Avail Use% Mounted on
/dev/md1              1.8T   39G  1.8T   3% /
tmpfs                 7.8G     0  7.8G   0% /lib/init/rw
udev                  7.8G  148K  7.8G   1% /dev
tmpfs                 7.8G     0  7.8G   0% /dev/shm
/dev/md0              243M   31M  200M  14% /boot

uname -a output that might be needed is

Linux server 2.6.32-5-686-bigmem #1 SMP Sun Sep 23 10:27:25 UTC 2012 i686 GNU/Linux

Note: If I login as root then everything is fine. This problem is only with a particular user

Edit: output of quota

Disk quotas for user user (uid 1000): none

output of quota -g

Disk quotas for group user (gid 1000): 

Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
/dev/disk/by-uuid/26fa7362-fbbf-4a9e-af4d-da6c2744263c
8971324* 1048576 1048576    none   43784       0       0  
3
  • What about quota -g (group quota)? Do you have quotas at all on that filesystem? Does running quotacheck help? Commented Mar 14, 2013 at 23:29
  • output of quota -g added above. I dont know about quotas in my file system. All I know is that I have set unlimited in quota option in webmin for two of the users I am running on my debian. Suddenly this user has started giving me quota problem without any change made by me. Regarding quotacheck it is not working, giving me -sh: quotacheck: not found Commented Mar 15, 2013 at 11:47
  • How to recalculate quota -> labs.erweb.it/pub/recalculate_quotas.php Commented Apr 15, 2015 at 15:29

5 Answers 5

19

The problem in my case was I had exceeded the number of inodes (file entries) supported by the file system. The command

df -i

revealed the problem in my VM:

Filesystem      Inodes   IUsed IFree IUse% Mounted on
/dev/vzfs      1500000 1500000     0  100% /

Deleting some unnecessary small files or increasing the amount of inodes (more complicated) resolves the issue. A command like this can help locate which directories have a lot of files in them (in this case searching underneath /var):

find /var -type d -size +256k
2
  • 1
    I think this command is better: find / -xdev -printf '%h\n' | sort | uniq -c | sort -kn1. Taken from the following answer. Commented Mar 5, 2019 at 20:32
  • Wow, apparently that was my problem, and the main responsible seemed to be a cloned git repository with a LOT of files. Commented May 12, 2021 at 17:28
15

The disk isn't full, but the disk space allowed for this user is full. You need to check quota(1), perhaps persuade the suspect to clean up their junk, or in an outburst of kindness increase it with edquota(8).

4
  • 4
    Both the commands you asked me to run gave my syntax error. edquota(8) gave me -bash: syntax error near unexpected token '8' Commented Mar 14, 2013 at 18:54
  • 2
    The (8) refers to section 8 (administrative commands) of the Unix manuals. Commented Mar 14, 2013 at 19:17
  • 6
    What is the command that just works? Commented Jan 22, 2021 at 14:38
  • the man command understads the section if given as fisrt argument. Therefore: man 8 edquota Commented Jan 8, 2024 at 16:30
1

I don't use Debian Squeeze, but I had a similar problem and maybe this could help someone else. My user account is for a student, so it's significantly lower than if I was running Linux from my home computer, but still... In a program I was running, I had output get written to a file. I ran into an infinite loop and had to cntrl-C from the program to cancel it. After this happened, I continued to get the error that my quota was full and couldn't save anything. Solution: Delete the output file my loop was writing to. After deleting this and fixing my loop my quota was freed back up again.

1

du -sch .[!.]* * |sort -h

use this command in the home directory(e.g. /usr2) to check which hidden folders are taking up space.

You can also check if there are package cache. It can be safely removed

2
  • Why don't you just use du on the /usr2 directory directly instead of bothering with a complicated globbing pattern (that you don't explain the need for)? Commented Oct 7, 2021 at 13:40
  • This might be helpful unix.stackexchange.com/a/356280/458332 Commented Oct 8, 2021 at 10:14
0

For me it seemed to be a permission problem:

  1. I created the folder /opt/JetBrains/
  2. Changed the permissions: sudo chmod 777 /opt/JetBrains (with 755 I got another error which was something like: ".../build.txt doesn't exist")
  3. I changed my install path to /opt/JetBrains

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.