using utimes(2) to change the time
acheng at uiucdcs.Uiuc.ARPA
acheng at uiucdcs.Uiuc.ARPA
Mon Aug 5 07:40:00 AEST 1985
>/* Written 12:23 pm Jul 31, 1985 by arnold at gatech.CSNET in uiucdcs:net.bugs.4bsd */
>In article <266 at brl-tgr.ARPA>, gwyn at brl-tgr.ARPA (Doug Gwyn <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 at gatech ARPA: arnold%gatech.csnet at 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 <mode> file"?
albert cheng
acheng at uiuc.ARPA acheng at uiuc.CSNET {ihnp4,pur-ee}!uiucdcs!acheng
Univ. of Illinois-Urbana where the Fighting Illini live.
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list