Results 1 to 11 of 11

Thread: How to automatically clear temporary upload files from File Manager?

  1. #1
    Member
    Join Date
    Jun 2009
    Posts
    63

    Default How to automatically clear temporary upload files from File Manager?

    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?

    How to automatically clear temporary upload files from File Manager?-1.png

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,054
    cPanel/WHM Access Level

    Root Administrator

    Default Re: How to automatically clear temporary upload files from File Manager?

    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. #3
    Member
    Join Date
    Jun 2009
    Posts
    63

    Default Re: How to automatically clear temporary upload files from File Manager?

    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. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,054
    cPanel/WHM Access Level

    Root Administrator

    Default Re: How to automatically clear temporary upload files from File Manager?

    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. #5
    Member
    Join Date
    Jun 2009
    Posts
    63

    Default Re: How to automatically clear temporary upload files from File Manager?

    Okay I tried uploading some files and they appear to happen only if they are cancelled/broken uploads.

  6. #6
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,054
    cPanel/WHM Access Level

    Root Administrator

    Default Re: How to automatically clear temporary upload files from File Manager?

    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. #7
    Member
    Join Date
    Jun 2009
    Posts
    63

    Default Re: How to automatically clear temporary upload files from File Manager?

    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. #8
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,054
    cPanel/WHM Access Level

    Root Administrator

    Lightbulb Re: How to automatically clear temporary upload files from File Manager?

    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. #9
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    2,065
    cPanel/WHM Access Level

    Root Administrator

    Default Re: How to automatically clear temporary upload files from File Manager?

    Quote Originally Posted by kabatak View Post
    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?
    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

  10. #10
    Member
    Join Date
    Jun 2009
    Posts
    63

    Default Re: How to automatically clear temporary upload files from File Manager?

    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. #11
    cPanel Staff cPanelMichael's Avatar
    Join Date
    Apr 2011
    Posts
    2,065
    cPanel/WHM Access Level

    Root Administrator

    Default Re: How to automatically clear temporary upload files from File Manager?

    Quote Originally Posted by kabatak View Post
    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.
    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.
    cPResources: Support Options - Submit a ticket here - Additional Support Options - Forums Search - Mailing Lists - Documentation - Migration Services
    -- cPanelMichael - Migration Specialist, Technical Analyst, cPanel Technical Support

Similar Threads

  1. File Manager - Upload files [bug]
    By Ivan A in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 01-08-2010, 09:12 AM
  2. Can't upload files using file manager
    By cappi in forum cPanel & WHM Discussions
    Replies: 8
    Last Post: 11-05-2007, 10:17 AM
  3. cannot upload via file manager
    By omenix in forum cPanel & WHM Discussions
    Replies: 1
    Last Post: 07-18-2006, 11:19 AM
  4. setting max file size upload through file manager?
    By irate in forum cPanel & WHM Discussions
    Replies: 6
    Last Post: 01-09-2005, 01:58 PM
  5. BUG * Wrong file upload (file manager)
    By H2Hosting.com in forum cPanel & WHM Discussions
    Replies: 0
    Last Post: 05-09-2003, 11:44 AM