Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: Notesfiles $Revision: 1.7.0.8 $; site uiucdcs Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxn!ihnp4!inuxc!pur-ee!uiucdcs!acheng From: acheng@uiucdcs.Uiuc.ARPA Newsgroups: net.bugs.4bsd Subject: Re: using utimes(2) to change the time Message-ID: <8200033@uiucdcs> Date: Sun, 4-Aug-85 17:40:00 EDT Article-I.D.: uiucdcs.8200033 Posted: Sun Aug 4 17:40:00 1985 Date-Received: Tue, 6-Aug-85 10:18:04 EDT References: <4809@mit-eddie.UUCP> Lines: 34 Nf-ID: #R:mit-eddie.UUCP:-480900:uiucdcs:8200033:000:1712 Nf-From: uiucdcs.Uiuc.ARPA!acheng Aug 4 16:40:00 1985 >/* Written 12:23 pm Jul 31, 1985 by arnold@gatech.CSNET in uiucdcs:net.bugs.4bsd */ >In article <266@brl-tgr.ARPA>, gwyn@brl-tgr.ARPA (Doug Gwyn ) writes: >> Why are there so many inquiries about doing things to the symbolic >> links instead of to the files to which they point? It doesn't seem >> to be necessary.. > >It sure is necessary if you're writing/using a file system backup program. >I've been converting a really nice program from System V to 4.2 BSD, and >symbolic links have been the hardest part. As it currently stands, when >restoring a symbolic link, you can't restore the mod time on the link itself, >or change the mode. (In fact, I have to now add code to check for that!) >... >Arnold Robbins >CSNET: arnold@gatech ARPA: arnold%gatech.csnet@csnet-relay.arpa >UUCP: { akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold >/* End of text from uiucdcs:net.bugs.4bsd */ I was trapped by the symbolic pointer too. I once created a symbolic pointer under root uid to point at a directory i just moved to a new location. But my root uid has a umask of 066 to make sure I won't accidentally leave sensitive files around for public access (I know, you may object to the umask value, but...) Well, the symbolic pointer is not accessible by anyone but root. So i "chmod" its mode but ended up screwing up the real directory. Finally, i changed my umask to 0, removed and recreated the symbolic link. It was no big deal, but i wonder if there is an easy way to change the mode of the symbolic link. How about a "chmod -l file"? albert cheng acheng@uiuc.ARPA acheng@uiuc.CSNET {ihnp4,pur-ee}!uiucdcs!acheng Univ. of Illinois-Urbana where the Fighting Illini live.