Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Nov 2001
    Posts
    492

    Question Are /tmp files included in cpanel disk usage calculation?

    Hello,

    Can someone from cpanel please confirm if this is true?

    1. Cpanel quota system includes any files in the system /tmp folder that are owned by the cpanel account user.

    2. Cpanel "disk usage viewer" utility does not include accounting of "owned" files in the system /tmp folder.

    3. Thus, it is possible for great disparity between reported disk usage in the cpanel, compared to what is shown as "used" by the disk usage viewer.

    Is this correct?

    The problem is that we often have customer's who are creating large files/folders in the system /tmp folder... and then they get upset when their account says "149999/250000 MB", but the disk usage viewer utility shows only 5gb disk usage.

    Sometimes, these customers think cpanel is broken, because they refuse to believe their script has created huge files in the system /tmp folder.

    If the above is true, can you please fix the cpanel disk usage viewer so it includes owned files in the system /tmp folder?

    Otherwise, there is little point to include this utility, since it is always going to be inaccurate (and misleading), resulting in upset customers.

    Thanks.

    STEPS TO RECREATE:

    1. Login to shell as any user.
    2. Change into system /tmp directory.
    3. Create a file with large size. Maybe 50gb or so. Whatever.
    4. Login to user's cpanel.
    5. Total disk usage should be at least 50gb used.
    6. Go to "Disk Usage Viewer" utility.
    7. Disk breakdown usage displayed under "Disk Usage Summary" does not include the file created in the system /tmp folder. Thus, user has no way to know where the "missing" 50gb is located, and gets upset because they think cpanel is broken and/or you're ripping them off.
    Last edited by electric; 10-27-2008 at 10:07 AM.
    I am an eNom ETP.
    Sign up today if you want an eNom.com domain reseller account from a reliable provider.
    * We now provide support and service to over 3250 happy resellers!

  2. #2
    Member SB-Nick's Avatar
    Join Date
    Aug 2008
    Posts
    110

    Default

    Hello,

    Im not a cPanel Official Technician but i will try to give you a hand.

    1. True
    2. False. It should display the same quota. Did you try to update/fix all quotas for users?

    If a user creates a file (Im assuming that the file is created under the same cPanel user name) outside his directory (/tmp for ex) it should count as used space for that user. That's how it should work.

    If they are complaining about used space they do not see, a good idea is to create a tmp folder for every specific user inside his home folder. Doings this will make your customers to see where are they using such of space.

    If you have any feature request about how cPanel works you could submit it to bugzilla.cpanel.net

    Hope i have been of help.
    Last edited by SB-Nick; 10-27-2008 at 09:35 AM.
    :: Server Buddies ::

    Server Management & Monitoring

    .Dedicated Server Solutions At Affordable Rates.

  3. #3
    Member
    Join Date
    Nov 2001
    Posts
    492

    Default

    Quote Originally Posted by SB-Nick View Post
    Hello,
    2. False. It should display the same quota.
    It does not. The disk usage viewer shows only the usage from files located inside the user's "/home/username/" folder.

    Files from outside his home directory are not included in the disk usage viewer display or calculation.

    Quote Originally Posted by SB-Nick View Post
    Did you try to update/fix all quotas for users?
    Yes. No change.

    Quote Originally Posted by SB-Nick View Post
    If a user creates a file (Im assuming that the file is created under the same cPanel user name) outside his directory (/tmp for ex) it should count as used space for that user. That's how it should work.
    That is how it works. That is not the issue. The issue here is that the user has no idea how much disk space is being used up from files located outside their /home/username folder, and the disk usage viewer utility does not show such files.

    Quote Originally Posted by SB-Nick View Post
    If they are complaining about used space they do not see, a good idea is to create a tmp folder for every specific user inside his home folder. Doings this will make your customers to see where are they using such of space.
    Already done. However, the system /tmp folder is still used by some scripts unless specifically changed. (All new cpanel accounts automatically have a tmp folder created as part of the basic directory structure.)

    I have not submitted this as a bug to bugzilla yet, because I would like to hear from anyone else about this. Is this a bug or "by design"?
    I am an eNom ETP.
    Sign up today if you want an eNom.com domain reseller account from a reliable provider.
    * We now provide support and service to over 3250 happy resellers!

  4. #4
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    This is the design of the /tmp directory. Files should periodically be removed from the /tmp directory. Some use a cron job that does this. If the user has shell access, he can remove files he owns from /tmp.

    Another way to handle this is to put /tmp on a partition that does not have quotas enabled.

  5. #5
    Member
    Join Date
    Nov 2001
    Posts
    492

    Default

    Quote Originally Posted by cpanelkenneth View Post
    This is the design of the /tmp directory. Files should periodically be removed from the /tmp directory. Some use a cron job that does this. If the user has shell access, he can remove files he owns from /tmp.

    Another way to handle this is to put /tmp on a partition that does not have quotas enabled.
    Right... I understand all this, but the fact remains that if the customer has some files in the /tmp folder... they are included in the cpanel disk usage calculation, but NOT in the Disk Usage Viewer.

    I think as a "fix" for this problem you might consider adding some text or something on the disk usage viewer that says the summary disk usage information does not include files located outside the user's account root folder.

    At least this way, they won't be totally surprised (or upset) when we tell them the reason they're over their disk space limit is because of files in the system /tmp folder...

    It's all about making things as "easy to use and understand" as possible.

    Thanks.
    I am an eNom ETP.
    Sign up today if you want an eNom.com domain reseller account from a reliable provider.
    * We now provide support and service to over 3250 happy resellers!

  6. #6
    cPanel Development cpanelkenneth's Avatar
    Join Date
    Apr 2006
    Posts
    3,788
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by electric View Post
    Right... I understand all this, but the fact remains that if the customer has some files in the /tmp folder... they are included in the cpanel disk usage calculation, but NOT in the Disk Usage Viewer.

    I think as a "fix" for this problem you might consider adding some text or something on the disk usage viewer that says the summary disk usage information does not include files located outside the user's account root folder.

    At least this way, they won't be totally surprised (or upset) when we tell them the reason they're over their disk space limit is because of files in the system /tmp folder...

    It's all about making things as "easy to use and understand" as possible.

    Thanks.
    I'll pass this along to the design department. We had discussed such a change in the description of the Disk Usage viewer due to other scenarios that cause disparity in space reporting.

  7. #7
    Member
    Join Date
    Nov 2001
    Posts
    492

    Default

    Quote Originally Posted by cpanelkenneth View Post
    I'll pass this along to the design department. We had discussed such a change in the description of the Disk Usage viewer due to other scenarios that cause disparity in space reporting.
    Sounds good. I do think adding the /tmp folder to the summary view area would be appropriate, since there is a high chance of at least a few files (php sessions, etc) being located in this folder.. and the folder itself is a known location.

    (ie: it's not like we don't know the /tmp folder doesn't exist when calculating disk space usage, so why not throw it into the summary display?)

    Anyway... anything is better then nothing.
    I am an eNom ETP.
    Sign up today if you want an eNom.com domain reseller account from a reliable provider.
    * We now provide support and service to over 3250 happy resellers!

Similar Threads & Tags
Similar threads

  1. Query About cPanel disk space usage calculation
    By crazyaboutlinux in forum cPanel and WHM Discussions
    Replies: 9
    Last Post: 01-15-2012, 08:17 AM
  2. Disk space usage ignoring files of nobody
    By marxiano533 in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 01-23-2011, 01:05 AM
  3. Disk Space Calculation Error in cpanel/whm current release
    By Bahram0110 in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-28-2010, 09:13 AM
  4. Files Owned by nobody and Disk Usage!
    By IdleServ in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 09-01-2006, 12:08 PM
  5. Disk usage in main cPanel VS Disk usage Icon
    By XPerties in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-05-2005, 07:16 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube