Start script

Mikkel L. Ellertson mellertson at gmail.com
Tue Feb 21 14:10:44 UTC 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 02/20/2012 06:00 PM, Dave Ihnat wrote:
> On Mon, Feb 20, 2012 at 11:38:49PM +0100, suvayu ali wrote:
>> Or use tmpwatch to do the cleaning.
>
> A good suggestion. I would also point out a warning to
developers--of both
> compiled programs and scripts.
>
> It's a poor program or script that creates files in /tmp or
/usr/tmp and
> doesn't take appropriate steps to protect itself. You should *expect*
> files and/or directories to be deleted from temporary directories.
>
> So how do you protect yourself? Set the sticky bit on files and
> directories. Keep them open as long as you're going to need them (open
> files and directories can't be "really" deleted.) And, of course,
> be good about cleaning up after yourself when you no longer need them.
>
> Good developers are paranoid.
>
>
One other thing - homer the TMP variable. Not so much for system
programs, but for user programs. I have a tmp directory as part of
/etc/skel, so every user gets a tmp directory as part of their home
directory structurer. The I set TMP as part of the login script. All
my user scripts  are set to use it. You do have to clean it
sometimes if programs/scripts do not clean up after themselves, but
at least you do not clobber needed temporary files.

Mikkel
- -- 
Do not meddle in the affairs of dragons, for thou art crunchy and
taste good with Ketchup!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAk9DpeQACgkQqbQrVW3JyMTTzQCfVo/Edo6/eCXdfDULrA9TLOk1
4zMAn2CrxYWQJFjE8O9eH04FvFUiooJY
=w87J
-----END PGP SIGNATURE-----



More information about the users mailing list