cleaning sticky directories (was Re: Guide to writing secure setuid programs?)
Evelyn C. Leeper
ecl at mtgzy.UUCP
Tue Mar 22 00:19:13 AEST 1988
In article <7476 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
> [re /tmp and /usr/tmp being shipped "sticky"]
> the system administrator ends up having to periodically clean out
> /tmp and /usr/tmp. With this new scheme, he'll have to become
> superuser to do this, unless a privileged operator-executable
> cleanup utility is provided (or the system is rebooted and does
> this on each reboot).
As a system administrator, I don't enjoy "baby-sitting" /tmp and /usr/tmp.
So I don't--I use the cron to do cleanups (with a shell script):
touch /tmp /usr/tmp
find /tmp -type f -mtime +0 -print | xargs rm -f 2>/dev/null
find /usr/tmp -type f -mtime +2 -print | xargs rm -f 2>/dev/null
(You can change the time as necessary. It's a little trickier if you need to
do cleanups of files based on hours rather than days, but it can be done.)
I also use this script to send me mail if /usr is starting to run low and lots
of other neat things.
Moral: Use the cron!
Evelyn C. Leeper
201-957-2070
UUCP: mtune!mtgzy!ecl or ecl at mtgzy.att.com
ARPA: ecl%mtgzy at att.arpa
More information about the Comp.unix.wizards
mailing list