chmod query

From: Horsnell T. (tsh@mrc-lmb.cam.ac.uk)
Date: Mon Sep 30 2002 - 06:40:49 EDT


All,

I discovered a few world-readable files in my mail-spool
directory recently (probably as a result of recovering lost mail
etc). I did what I thought was the sensible thing and chmod'd
them to 600, and lo and behold, two of them shrank.

Why would this happen? Does one have to make sure that the
file is closed before chmod'ing? And if so, how does one avoid
a race condition if the file gets opened at the instant of the
chmod?

Has anyone else had this happen to them?

ES40, V5.1 PK4.

Cheers,
Terry

Terry Horsnell (tsh@mrc-lmb.cam.ac.uk)
I.T. Manager
Medical Research Council
Lab of Molecular Biology
Hills Road
CAMBRIDGE CB2 2QH
U.K.
Phone: +44 (0)1223 248011
Fax: +44 (0)1223 213556



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:48:54 EDT