Mailinglist Archive: opensuse-features (299 mails)

< Previous Next >
[openFATE 307510] Cron: set MAX_DAYS_IN_TMP different from 0
  • From: fate_noreply@xxxxxxx
  • Date: Tue, 4 May 2010 10:58:31 +0200 (CEST)
  • Message-id: <feature-307510-19@xxxxxxxxxxxxxx>
Feature changed by: Michal Vyskocil (mvyskocil)
Feature #307510, revision 19
Title: Cron: set MAX_DAYS_IN_TMP different from 0

openSUSE-11.3: Unconfirmed
Priority
Requester: Important

Requested by: Ricardo Gabriel Berlasso (rgbsuse)

Description:
 
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.
 
 

Discussion:
#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!
+1

#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).
 
 
 

#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
package.
 
There's still /etc/cron.daily/suse.de-clean-tmp 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/suse.de-clean-tmp 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
read
sysconfig options (from /etc/sysconfig/cron) used by suse.de-clean-tmp

+ #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.
+ https://fate.novell.com/309448



--
openSUSE Feature:
https://features.opensuse.org/307510

< Previous Next >
This Thread