Find disk usage for a domain in CPanel

If a domain has exceeded the allocated quota, but the check on its main directories do not reflect the correct space occupied, most probably is a problem of other directories which are located somewhere else but do have the same user as owner.

At least it happened withus where we had to do a quick backup from one production server to another (a temporary solution). While doing the backups, the new files copied had the same user-id as existing local users. By the end of the day, a few domains have exceeded their configured space limitations.

Whatever the situation, you should be able to find all the files which belong to a specific user in the filesystem. First the user-id of the linux user has to be found:
A quick check on /etc/passwd with the domainuser (if, most probably your user is example)

cat /etc/passwd | grep $domainuser


The first number is the userid, in this case 765

Now you can check the whole filesystem for resources allocated to this user:

find / -uid 765

If you find some user in some other directory, just fix the ownership information and you are good to go