[GRASS5] Cleaning of temp files

Markus Neteler neteler at itc.it
Wed Apr 17 07:47:00 EDT 2002


On Wed, Apr 17, 2002 at 12:28:32PM +0100, Glynn Clements wrote:
> 
> Markus Neteler wrote:
> 
> > it seems that sometimes problems occur with the cleaning of
> > temporal files. Normally, when a GRASS session is closed,
> > the tool
> > $GISBASE/etc/clean_temp
> > 
> > is called. However, people who work in a single project
> > may not close the GRASS session for weeks. In that
> > case tons of temporal data in
> > $LOCATION/$MAPSET/.tmp/$HOSTNAME/
> > are stored, consuming eventually lot of space (I just discovered
> > temp files totally consuming 1GB in our network).
> > 
> > Does anyone have a suggestion if we can install something
> > like a cronjob or whatever, which deletes temp files of
> > a certain age?

[thanks for the d.text pointer]
 
> Are you referring to having GRASS do this by default (as opposed to
> something specific to your site)? If so, then it is complicated by the
> fact that "crontab" commands aren't entirely portable (there's at
> least POSIX syntax, SVR3 syntax and the old Vixie-cron syntax).
> 
> Also, you may need to create separate crontab entries for each user. 
> If you run a "temp cleaner" as root, you need to allow for the
> possibility of malicious users tricking it into deleting arbitrary
> files through a combination of symbolic links and race conditions.

I would prefer to have the current GRASS session taking care of
the cleaning. That keeps maintenance at a minimum (we have often
students here for short time, also people tend to login on
different machines and access the centralized location etc.).

Maybe the GRASS-daemon Roger is developing can watch the session and
delete things if unnecessary. Or some 'at' job started after opening
a new GRASS session?

Markus



More information about the grass-dev mailing list