From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 1205 invoked from network); 15 Mar 2000 23:16:39 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 15 Mar 2000 23:16:39 -0000 Received: from kwanon.research.canon.com.au (kwanon.research.canon.com.au [203.12.172.254]) by mail.redhat.com (8.8.7/8.8.7) with SMTP id SAA09591 for ; Wed, 15 Mar 2000 18:16:38 -0500 Received: (qmail 2851 invoked from network); 15 Mar 2000 23:16:06 -0000 Received: from eos.research.canon.com.au (203.12.175.190) by kwanon-heat.research.canon.com.au with SMTP; 15 Mar 2000 23:16:06 -0000 Received: from ramires.research.canon.com.au (ramires.research.canon.com.au [203.12.174.82]) by eos.research.canon.com.au (Postfix) with ESMTP id 57D0A2C13 for ; Thu, 16 Mar 2000 10:19:53 +1100 (EST) Received: by ramires.research.canon.com.au (Postfix, from userid 331) id 1867EF4DF; Thu, 16 Mar 2000 10:13:19 +1100 (EST) Date: Thu, 16 Mar 2000 10:13:19 +1100 From: Cameron Simpson To: axp-list@redhat.com Subject: Re: touch symbolic links Message-ID: <20000316101319.A17884@ramires.research.canon.com.au> Reply-To: cs@zip.com.au References: <200003152117.QAA15720@harold.colgate.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <200003152117.QAA15720@harold.colgate.edu>; from dschult@harold.colgate.edu on Wed, Mar 15, 2000 at 04:17:21PM -0500 Sender: cameron@research.canon.com.au On Wed, Mar 15, 2000 at 04:17:21PM -0500, Dan Schult wrote: | I had a problem with dates when I first installed Linux on | an XP1000. The hardware clock was off by 48 years, and the | system kept getting reset to that time upon boot (as it should). | I have now fixed that problem based on a posting from Dec 1999 | to this list. Now I just need to correct all the files that | have been given dates in the future. | | I hacked a bash script to touch the files with the corrected dates | but I can't touch the symbolic links. | | ============== | Can someone explain how to change the timestamp on a symbolic link? | ============== | | It seems like it has to be possible. It's not. | If not, I may have to resort to recreating the links... This is the correct approach. On some systems symlinks aren't even separate objects but merely special directory entries (thus no inode, no perms, no ownership etc). Almost every system call follows symlinks, including things like chown and chmod. While this makes a certain warped sense because nothing you do to perms on a symlink will really affect security (since you can always just use the path the link uses direct), I think it's horrible. IMHO, the only system calls which should follow symlinks are stat, open and chdir. Then you could do the old "chmod -R" etc without fear of a rogue symlink. Instead one has to say uglinesses like find . ! -type l -exec chown blah {} ';' to avoid treading on things outside the namespace. Very grody. Cheers, -- Cameron Simpson, DoD#743 cs@zip.com.au http://www.zip.com.au/~cs/ WHAT is your name? Captain Jean-Luc Picard WHAT is your quest? I seek the Holy Grail WHAT is the top velocity of a Bird of Prey? Romulan or Klingon? I....I don't know...AAAHHHH!!!! - Mike Gaines, meg5184@hertz.njit.edu