[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: touch symbolic links



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



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []