How to fix Disk Quota Exceeded error in Linux servers?

Disk Quota Exceeded is a common error in Linux web hosting servers. Website owners see this error when they try to upload a file, send a mail or update a database.

These are causes for the error:

  1. Users exceeding their mail or web space quota
  2. Corrupted disk quota table
  3. File limit (inode) exhaustion

Fixing mail/web space overage

About 80% of disk quota exceeded errors occur due to users uploading files beyond their subscription limit.

In many cases, we’ve found large files (such as backup, videos, DB dumps, etc.) in the user’s home directory itself. But there are other locations that are not so obvious:

  1. Trash or Spam mail folders
  2. Catch-all mail accounts
  3. Web app log files (eg. WordPress error log)
  4. Old log files (eg. access_log.bak)
  5. Old uncompressed backups (from a previous site restore for eg.)
  6. Un-used web applications

Fixing cPanel disk quota cache error

In cPanel servers, even after a disk quota exceeded error is resolved, the web panel shows the old disk space info. That is, even if a 1 GB file is deleted, the space usage doesn’t show any difference.

It is caused by a cPanel feature called “disk quota cache”. cPanel stores disk usage info for 15-30 mins, to reduce disk access, and thereby keep down server load.

Uses these approaches:

  1. In powerful servers, we disable this cache (choose off), as server load isn’t affected.
  2. In heavily loaded or less powerful servers, we educate the users via custom tooltips in the panel that the correct value will be reflected in 15 mins.

How to prevent space overage

Disk space overage results in customers losing their business emails, or websites being down. We’ve been able to reduce the incidence of such downtime in web hosting companies by sending “Disk Quota Warning” emails with specific steps on what to check, and how to delete excess files.

Fixing incorrect quota table

Linux servers store quota information in files such as aquota.user, aquota.group, .quota.user, etc.

In some situations, such as a server crash or hard disk errors, these files could get corrupted, leading to many users getting quota related errors.

When we see a sudden surge in mail or web quota errors for many users at once, we immediately check the quota table. In general, we follow these steps:

  1. Disable quota for the affected partition (usually /home in web hosting servers)
  2. Stop services such as mail, web, and FTP that can write new files
  3. Recreate the quota table using the “quotacheck” command (or fix quota in cPanel servers)
  4. Re-enable quota for the affected partition

Resolving file limit (inode) exhaustion

Linux servers use something called inodes to keep track of each file. The trouble is, each server (or VPS) has only a limited number of inodes. So, when all inodes are used up by a malicious activity (eg. a spam attack), new files cannot be created.

Here are a few common causes for iNode exhaustion:

  1. Thousands of un-delivered spam mails filling up the mail queue.
  2. Several versions of un-compressed backups
  3. Catch-all mailboxes that accumulated years worth of emails
  4. Old cache files of some programs such as “eAccelerator”
  5. PHP session files that are not automatically deleted


Never let disk quota errors affect your website functioning. For assistance, visit  hire our expert

Was this answer helpful? 0 Users Found This Useful (4 Votes)