Mailinglist Archive: opensuse-features (542 mails)

< Previous Next >
[openFATE 307510] Cron: set MAX_DAYS_IN_TMP different from 0
  • From: fate_noreply@xxxxxxx
  • Date: Mon, 20 Dec 2010 09:43:06 +0100 (CET)
  • Message-id: <feature-307510-23@xxxxxxxxxxxxxx>
Feature changed by: Satoru Matsumoto (HeliosReds)
Feature #307510, revision 23
Title: Cron: set MAX_DAYS_IN_TMP different from 0

- openSUSE-11.3: Unconfirmed
+ openSUSE-11.3: Duplicate of #309448
Requester: Important

Requested by: Ricardo Gabriel Berlasso (rgbsuse)
Partner organization:

By default, openSUSE set MAX_DAYS_IN_TMP and MAX_DAYS_IN_LONG_TMP to
zero, which means /tmp and /var/tmp folders are never cleaned. New
users do not know of this, and after a while their hard drives ends
with a lot of “garbage”. People who need those files not to be removed
for sure will know how to change this default value but many people who
don't need those files will not know about them until a “disk full”
warning appears. This is particularly true for netbooks and old
computer with small drives.
My proposal is to set cron defaults to periodically clean the /tmp and
/var/tmp folders.

+ Relations:
+ - (feature/duplicate: 309448)

#1: Robert Davies (robopensuse) (2009-12-01 01:05:28)
Agreed!  Once with SuSE 8.2 I installed a machine for someone using it
offsite, and I missed to change that; because /tmp was never cleared up
sometimes login would fail, and it would fail strangely, and not in
such a way that had me checking /tmp, so it was only when I got the
machine back I noticed.
Personally deleting files with policy something like, not accessed for
7 days, and that are older than 28 days  in /tmp; or 1 month & 3 months
in /var/tmp would be very conservative defaults, yet reduce maintenance
for the "oblivious".

#2: Jan Engelhardt (jengelh) (2009-12-30 19:46:21)
If it was not for tmpfs having a limited storage amount, I would simply
mount a tmpfs onto /tmp. (Hey, IIRC, Solaris does that.) So yes, I too,
agree here, to set the clean interval to non-zero.

#3: Axel Braun (docb) (2010-02-08 17:29:56)
Good idea, I'm tired of changing this all the time!

#4: Jean-Daniel Dodin (jdd) (2010-05-02 16:56:23)
I just had the problem. 6+Gb in /tmp!!! The only thing I can se that
could cause the problem was a dvd dl with mozilla. I let it yesterday
night and on the morning couldn't find any result anywhere. I beg the
partition filled and aborted the dl, but didn't remove the partial
file. Don't know how to make apps *don't* use /tmp for such heavy job.
May be it's not this, I had very restricted acces to the computer at
the moment, so I removed all in /tmp and can't investigate more :-(.
I use to make MAX_DAYS_IN_TMP = 7
at least a warning mail should be nice. Here, it's a "startx" error
message that said "no place in /tmp" that made me find the clue

#5: Per Jessen (pjessen) (2010-05-02 19:38:47)
Please don't change the default - not emptying /tmp is a SAFE default,
and with harddisks growing bigger every minute, saving space isn't even
an argument.

#6: Gerald Pfeifer (geraldpfeifer) (2010-05-03 10:17:27)
We may want to treat /var/tmp and /tmp differently here and only empty
/tmp by default.
Even setting a very large default, one year or a couple of months,
might make sense.

#7: L. A. Walsh (lawalsh) (2010-05-03 10:32:23)
I disagee Per -- having a temporary store that constantly fills up is a
change from traditional unix behavior.
We shouldn't rescind that unless you want to explain to those who've
had the old behavior around for 10-15 years, why it should be changed.
There's no compelling reason why both /tmp and /var/tmp shouldnt'be
*pruned* on a daily basis.
If they were any place other than the standard system /tmp, /var/tmp,
I'd agree with you.  But these are historically places that are cleared
out after some period of disuse.
I'd suggest:
/tmp - 3 weeks for all but root;
/var/tmp/ - 6 weeks for all but root.
That should be plenty of time for someone to find somplace else to
store something than in /tmp.
It's called "tmp" for a reason.  (If you want more permanent storage,
use /perm (of course you may have to create the dir...:-))...
While it isn't likely to affect any of my daily-use systems, it might
affect test or lab systems, where I don't go over or review every
parameter in /etc/sysconfig with a fine tooth comb.  Most people won't
due that, so better to give them safe defaults.
Not keeping /tmp and /var/tmp cleaned out is NOT safe, as it doesn't
provide any method of cleaning out those directories on what may be a
smaller file system.  We have log-rotate mechanisms to manage over-
growing log messages, but nothing will manage tmp if we disable
automatic 'old-file' deletion, which is standard for those directories
(of all directories on the system, those two are two that are
historically managed that way).

#11: Per Jessen (pjessen) (2010-05-04 11:21:18) (reply to #7)
Linda, I'm advocating NO change - that's the point. Changing the
retention time for /tmp etc is easily done manually, but changing the
openSUSE default to automatically start purging peoples file (temporary
or not) is not a safe change for little or no good reason.

#8: Robin Knapp (rknapp) (2010-05-03 12:43:24)
Mhh... now the package tmpwatch is default in M6 which drops a script
in /etc/cron.daily.
I wonder why they did not just change the variables but added a new
There's still /etc/cron.daily/ which seems to do the
same task

#9: Michal Seben (mseben) (2010-05-03 16:06:30)
I think we should drop old /etc/cron.daily/ and use
instead of
this tmpwatch - which has upstream, it is used also by other distros
and has
more features
about sysconfig options : we could rework /etc/cron.daily/tmpwatch to
sysconfig options (from /etc/sysconfig/cron) used by

#10: Michal Vyskocil (mvyskocil) (2010-05-04 10:58:22)
Hi all, I created a new FATE#309448 about change of the SUSE default
behavior and /tmp - that is not about concrete technical solution, just
about if it's widelly required, or not.

#12: Robin Knapp (rknapp) (2010-05-05 10:32:02) (reply to #10)
For the openSUSE users, that's

+ #13: Satoru Matsumoto (heliosreds) (2010-12-20 09:42:00)
+ As Robin wrote, a new feature is requested and since 11.3 has been
+ already released, please continue discussion at

openSUSE Feature:

< Previous Next >
This Thread
  • No further messages