Fix Quotas in cPanel

Discussion in 'Security' started by sendemi, Aug 18, 2010.

  1. #1
    Cpanel/WHM sometimes has problems with the user quota files causing all users accounts to have unlimited disk space available or 0 megs of disk space in use. This obviously confuses your customers and doesn't show a real representation of actual disk space being used by your clients. This guide will take you through fixing any quota issues with Cpanel manually or automated.

    Common reasons for quota problems

    - There are files owned by the same user elsewhere on the server
    - The backup directory is being counted towards the users disk quota
    - Extra log files are being counted towards the users quota
    - Cpanel was just updated and the quotas are now unlimited

    Quick Fix - an easy way to fix quota issues

    Step 1. Log into your server through SSH as the root user.

    Step 2. Run the following command


    /scripts/fixquotas



    Advanced Fix - other reasons quotas are not working

    Step 1. Find the user account where the quotas are incorrect and login to your server in SSH as root.

    Step 2. Go to the users folder and check their disk space being used.

    cd /home/username
    du -h or try du -hs

    Step 3. Check /etc/passwd and /etc/shadow to make sure there is no weirdness where the username shows up multiple times.

    Step 4. Try finding other files owned by the user.

    find -user username | more

    This will list all files owned by this user that could be affecting the quota reported by Cpanel.

    Step 5. Uncompressed backups can cause quota problems, ensure your backups are compressed in the WHM backup options.

    Step 6. After your determine the source of the files and remove them then run

    /scripts/fixquotas
     
    sendemi, Aug 18, 2010 IP
  2. BreezeHost

    BreezeHost Member

    Messages:
    139
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    28
    #2
    Good tutorial :)
     
    BreezeHost, Aug 18, 2010 IP
  3. onel0ve

    onel0ve Member

    Messages:
    53
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    43
    #3
    onel0ve, Aug 18, 2010 IP
  4. MirVB

    MirVB Peon

    Messages:
    70
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Great tutorial. Also, if you're on a VPS, there might be an inode limit, causing disk quota issues. You can run df -i to see current inode usage.
     
    MirVB, Aug 21, 2010 IP
  5. admindiary.com

    admindiary.com Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Good tutorial...Thanx for the information.
     
    admindiary.com, Sep 3, 2010 IP