• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved Hundreds of cache_xxxx files in /tmp

PSi_101

Regular Pleskian
In my /tmp directory there are hundreds of files named cache_xxxxxxx, some dating back 5 months ago. I figure Horde is leaving these files behind, but is there a way to make Horde cleanup after itself?
 
Hi PSi_101,

one solution could be to setup a cron task with for example:

find /tmp "cache*" -mtime +1 -exec rm -f {} \;

( deletes found files with the name "cache*" in the directory "/tmp", which are older than 1 day )
Another way is to use "tmpwatch" => http://linux.die.net/man/8/tmpwatch


Optional, you could setup horde, to use another location for it's temporary files ( "/tmp" might be too small, or you just want to have more control over possible horde - temp - files... ) and you could again use a cron task to empty that folder on a regular basis. To achieve this goal, you would for example create the desired folder where ever you would like to and add for example at "/usr/share/psa-horde/config/conf.local.php":

Code:
$conf['tmpdir'] = '/where/ever/you/want/to/horde_cache';


Yes, it's correct... horde for example misses to delete temporary files from time to time and there is no additional automatic removal procedure configured, which takes care about the "lost garbage" :D
 
Thanks @UFHH01 I think i'm going to have to do what you suggested. It would have been nice if Horde cleaned up itself but it is what it is.
This is what i've settled on which should handle other tmp files as well:

find /tmp -name "*" -atime +30 | xargs rm -f
 
Last edited:
Back
Top