atom feed3 messages in com.redhat.axp-listRe: touch symbolic links
FromSent OnAttachments
Dan SchultMar 15, 2000 1:16 pm 
Cameron SimpsonMar 15, 2000 3:12 pm 
cp...@aladdin.deMar 15, 2000 3:30 pm.gz
Subject:Re: touch symbolic links
From:Cameron Simpson (
Date:Mar 15, 2000 3:12:57 pm

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.


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,