How to automatically clear temporary upload files from File Manager?

kabatak

Well-Known Member
Jun 10, 2009
149
8
68
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
 

kabatak

Well-Known Member
Jun 10, 2009
149
8
68
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).
 

kabatak

Well-Known Member
Jun 10, 2009
149
8
68
Okay I tried uploading some files and they appear to happen only if they are cancelled/broken uploads.
 

kabatak

Well-Known Member
Jun 10, 2009
149
8
68
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?
 

Infopro

Well-Known Member
May 20, 2003
17,085
521
613
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
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.
 

kabatak

Well-Known Member
Jun 10, 2009
149
8
68
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,904
2,237
463
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.