Bug 31863 - Clean up /var/tmp/kdecache-${USERNAME}
Clean up /var/tmp/kdecache-${USERNAME}
Status: CLOSED FIXED
Product: Z_Univention Corporate Client (UCC)
Classification: Unclassified
Component: General
unspecified
Other Linux
: P5 normal
: UCC 2.0
Assigned To: Moritz Muehlenhoff
Felix Botner
: interim-3
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-01 15:36 CEST by Janis Meybohm
Modified: 2014-06-12 09:19 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2013-07-01 15:36:51 CEST
We should clean up /var/tmp/kdecache-${USERNAME} after X days without access.
Each directory is around 100-200MB big. With many different users logging into one client the root partition gets filled up.

A client boot into guest/kiosk mode also creates a /var/tmp/kdecache-guest-${RANDOM} directory (~100MB) so with the default setup (15GB root partition, ~9GB free) "only" ~92 boots are possible.
Comment 1 Janis Meybohm univentionstaff 2013-07-01 15:47:02 CEST
Reportet by a customer: <http://forum.univention.de/viewtopic.php?f=64&t=2726>

Maybe a special "tmpreaper" configuration could be a solution for this.
Comment 2 Moritz Muehlenhoff univentionstaff 2013-12-16 12:30:34 CET
In UCC 1.1 it should be checked whether this still occurs with more recent KDE releases
Comment 3 Moritz Muehlenhoff univentionstaff 2014-05-14 12:47:38 CEST
tmpreaper -v 1d /var/tmp/kdecache-*
can be used to remove all files which haven't been touched for longer than a day.

Maybe there's a possibility to move the KDE cache into the /home (which isn't space constrained).
Comment 4 Moritz Muehlenhoff univentionstaff 2014-05-14 13:03:51 CEST
(In reply to Moritz Muehlenhoff from comment #3)
> Maybe there's a possibility to move the KDE cache into the /home (which
> isn't space constrained).

Should be possible with KDEVARTMP :
http://techbase.kde.org/KDE_System_Administration/KDE_Filesystem_Hierarchy
Comment 5 Moritz Muehlenhoff univentionstaff 2014-05-14 15:01:35 CEST
The mechanism to configure environment vars through the UCC desktop policy (Bug 29941) isn't working correctly in UCC 2.0:

Configuring "KDEVARTMP" as the variable and "~/.kde-cache" asthe values generates a .ucc-environment file with the content

KDEVARTMP DEFAULT="~/.kde-cache
Comment 6 Moritz Muehlenhoff univentionstaff 2014-05-15 10:08:13 CEST
(In reply to Moritz Muehlenhoff from comment #5)
> The mechanism to configure environment vars through the UCC desktop policy
> (Bug 29941) isn't working correctly in UCC 2.0:
> 
> Configuring "KDEVARTMP" as the variable and "~/.kde-cache" asthe values
> generates a .ucc-environment file with the content
> 
> KDEVARTMP DEFAULT="~/.kde-cache

The format of the .ucc-environment file is correct, but the file wasn't parsed correctly. The reason was that user_readenv needs to be explicitiy enabled in he PAM release in 14.04. Fixed in univention-ucc-pam_2.0.0-5
Comment 7 Moritz Muehlenhoff univentionstaff 2014-05-15 10:11:02 CEST
(In reply to Janis Meybohm from comment #0)
> We should clean up /var/tmp/kdecache-${USERNAME} after X days without access.
> Each directory is around 100-200MB big. With many different users logging
> into one client the root partition gets filled up.
> 
> A client boot into guest/kiosk mode also creates a
> /var/tmp/kdecache-guest-${RANDOM} directory (~100MB) so with the default
> setup (15GB root partition, ~9GB free) "only" ~92 boots are possible.

The cache is still useful. Also, on a terminalserver users might be logged in for a long time and the tmpreaper might remove files of logged-in users.

KDEVARTMP is now set to ~/.kde-cache in the /etc/xrdp/UCC-KDE session script. This way the cache is kept in the user's home.
Comment 8 Felix Botner univentionstaff 2014-05-20 11:59:53 CEST
OK

Changelog?
Comment 9 Moritz Muehlenhoff univentionstaff 2014-05-20 12:14:14 CEST
(In reply to Felix Botner from comment #8)
> OK
> 
> Changelog?

Now commited.
Comment 10 Felix Botner univentionstaff 2014-05-21 09:30:14 CEST
OK
Comment 11 Moritz Muehlenhoff univentionstaff 2014-06-12 09:19:39 CEST
UCC 2.0 has been released:
 http://docs.univention.de/release-notes-ucc-2.0.html

If this error occurs again, please use "Clone This Bug".