Detect and Clean a hacked server T0rnkit Tutorial Published: Apr 22, 2004
  • Rating

    5/5

Cpanel tutorial to fix Cpanel when the user quotas aren't reading properly or showing unlimited for all user accounts using /scripts/fixquotas

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

We've covered the common ways accounts report invalid disk quotas with Cpanel. If the Quick Fix doesn't work then you'll need to do some digging through our Advanced Fix. Ask any questions in our forums!

  • Rating

    5/5

Related Articles

Comments (3)

  • Gravatar - Steven Ciaburri
    Steven Ciaburri 04:35, May 2, 2004
    PLease note run rkhunter you will find more items infected.

    Thelinuxguy
  • Gravatar - Jackson
    Jackson 09:33, October 23, 2005
    You should NEVER clean a rooted or comprimized system. <br />
    <br />
    You will never get all the files the hacker put in place on the server. You MUST and this is the ONLY way to make sure the hacker can not get back in to your system again is to either Format and reinstall or install a new drive and OS then salve the old drive over to the new and boot up... Mount the old drive and copy over your files... NO BINARIES THOUGH! Just user files.<br />
    <br />
    This has to be the stupidest tutorial ever. Any expert knows the only way to clean a rooted system is to start from scratch.<br />
    <br />
    Period.
  • Gravatar - Kevin
    Kevin 23:47, January 18, 2006
    I agree with you Jackson. It's like dropping a cake on a wet, dirty floor. If you just give it a simple wipe on 1/4 of the cake. It's still dirty, but not as visably. Who knows? The hacker could have been smart and installed a few more root kits incase you follow this.

Add Your Thoughts

WebHostGear.com is a hosting directory, not a web host.

Copyright © 1998-2024 WebHostGear.com