The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to automatically clear temporary upload files from File Manager?

Discussion in 'General Discussion' started by kabatak, Jul 16, 2012.

  1. kabatak

    kabatak Well-Known Member

    Joined:
    Jun 10, 2009
    Messages:
    80
    Likes Received:
    1
    Trophy Points:
    8
    I noticed several files like this in user accounts that are uploading via File Manager. And it eats up significant amount of space. Is there a way to automatically delete this?

    1.png
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Were these file uploads canceled or connection dropped on the way up possibly?

    I've just tested this with several different file sizes and see none of these files in tmp on the account afterward.
     
  3. kabatak

    kabatak Well-Known Member

    Joined:
    Jun 10, 2009
    Messages:
    80
    Likes Received:
    1
    Trophy Points:
    8
    I am not sure however what I'm sure is these are only present in some accounts that exclusively use File Manager (i.e., not FTP).
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Have you attempted to duplicate this yourself from one of the accounts? I think I'd start there. That way you know yourself if the upload makes it properly or not. And if it does, does the tmp file get removed proper or no?

    Let us know how it goes. :)
     
  5. kabatak

    kabatak Well-Known Member

    Joined:
    Jun 10, 2009
    Messages:
    80
    Likes Received:
    1
    Trophy Points:
    8
    Okay I tried uploading some files and they appear to happen only if they are cancelled/broken uploads.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    So now you need to find out why that's happening. If the user is no help there, your logs might be useful not sure how much though.
     
  7. kabatak

    kabatak Well-Known Member

    Joined:
    Jun 10, 2009
    Messages:
    80
    Likes Received:
    1
    Trophy Points:
    8
    Hmm, I am not sure how logs might be useful. Isn't this happening within the cpanel software and shouldn't the temp files be clear after x hours?
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Well, for example if the user had too many connections to the server for some reason, or his IP changed during the upload and he got temporarily blocked by your firewall. Or maybe it was clamav blocking. I think those sort of things might cause this issue and be logged.

    You can manually run tmpwatch as root user to check exactly what it does with this:

    Code:
    /usr/sbin/tmpwatch -tv 240 /tmp
    The t means test mode, the v is verbose, tells you what it will do.

    User account tmp directories are not a part of that. I believe there are other threads on how to automate clearing that with a cron, but I couldn't dig one up here to link you to in the limited amount of time I looked.

    Hopefully someone much smarter than I can chime in on this one for you.
     
  9. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Those log files are created when files are uploaded to the account via cPanel File Manager. It lists the file size, file name, it's progress, and the location of the temporary file during the time of upload. They should, however, be automatically removed over time. If this is not happening, please submit a ticket so we can look into this further:

    Submit A Ticket

    Thank you.
     
  10. kabatak

    kabatak Well-Known Member

    Joined:
    Jun 10, 2009
    Messages:
    80
    Likes Received:
    1
    Trophy Points:
    8
    I am now running a cron job to clean them but I'm pretty sure it's not being cleaned on it's own since the temp file's date is FEB 2012 and it's now JUL 2012.
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    If you notice it continues to leave the temporary files in place, please open a ticket so we can check further and rule out any potential bugs. I did try to reproduce this on a test server, but the temporary files were automatically deleted.

    Thank you.
     
Loading...

Share This Page