[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
chmod changes ctime even if no changes were made
From: |
Hans Ecke |
Subject: |
chmod changes ctime even if no changes were made |
Date: |
Thu, 23 Sep 2004 21:39:12 -0600 (MDT) |
Hi,
I noticed that chmod changes the ctime of files, even if no permissions
are actually changed.
I ran into this because some maintenance scripts here run
"chmod -Rc ugoa+rX $directory"
every night for some directories that ought to be generally accessible.
Unfortunately this also triggers some OS-provided maintenance scripts
that see "Oh, ctime has changed, let me rebuild this subsystem.". This
is very annoying, and the users are not happy since their computers do
pointless rebuilds, consuming CPU.
Is there any way that chmod could first see if the requested status
change has already been fulfilled, and skip files where it would not
change anything?
I can see that this would slow chmod down (one more stat (2) call per
file), so making this an option would be fine...
Thanks
Hans
--
Hans Ecke address@hidden / address@hidden
Department of Geophysics http://hans.ecke.ws
Colorado School of Mines Tel: (USA) 303-273-3733
Golden, Colorado Fax: (USA) 303-273-3478
We must all hang together, or assuredly we shall all hang separately.
-- Benjamin Franklin
- chmod changes ctime even if no changes were made,
Hans Ecke <=