[GRASS5] Cleaning of temp files

Glynn Clements glynn.clements at virgin.net
Wed Apr 17 07:28:32 EDT 2002


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?

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.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-dev mailing list