home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!netxcom!jwc
- From: jwc@netx.com (Jeffrey W. Comer)
- Newsgroups: comp.unix.questions
- Subject: Re: Monitoring /tmp
- Message-ID: <1383@netxcom.netx.com>
- Date: 5 Nov 92 17:36:53 GMT
- Sender: news@netxcom.netx.com
- Organization: The Chaos Bobs
- Lines: 30
-
- peter@merlin.acadiau.ca (Peter Steele) writes:
- >I was wondering if other sites have this kind of problem, where
- >students will copy large files into /tmp and leave them their so
- >their friends can copy them to their accounts. Their reasoning
- >is that this is simpler than setting the files up as public in
- >their own accounts, plus it doesn't take away from their quotas.
- >I don't like this practice as it fills up /tmp and could possibly
- >cause a program requiring legitimate use of /tmp to fail due to
- >lack of space. Has anyone got any suggestions on how to prevent
- >this sort of abuse of the /tmp directory? I can think of one
- >simple solution: A global .logout that executes:
- >
- > find /tmp -user $user -exec rm {} \;
- >
- >but that has some potential problems...
-
- Well you could always reboot every day.... q;-> Seriously, here at my
- company we have a cron job called prune that runs once a day. It reads
- an input file, into which you can enter filenames (/etc/?tmp for example)
- or directories (/tmp). After each name, you can have prune remove a file
- if it grows beyond a certain size (in k-bytes) or it hasn't been updated
- after x days. It's very effective, except that you can always defeat it
- by touching your files.
-
- E-Mail me for details.
-
- And yes, we also have this problem, not just in /tmp, but in ALL filesys-
- tems.
-
- -jc
-