From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,ef07fdae495b5c3f X-Google-Attributes: gidfee84,public From: mikeh@aslan.eng.mindspring.net (Mike harrelson) Subject: Re: chmod on link? Date: 1998/12/11 Message-ID: <74r2uk$84r$1@camel0.mindspring.com>#1/1 X-Deja-AN: 421161868 References: <366E3AEE.4D39123B@vsb.cz> <366E7B5A.D45A3979@ev.co.yu> <74mhkm$7le@ds2.acs.ucalgary.ca> Organization: MindSpring Enterprises, Atlanta Newsgroups: comp.unix.osf.osf1 In article <74mhkm$7le@ds2.acs.ucalgary.ca>, Serguei Patchkovskii wrote: >Casper H.S. Dik - Network Security Engineer (Casper.Dik@Holland.Sun.Com) wrote: > >: A soft/sym link is not a file. > >: It can be manipulated in only two ways: > >: - unlink(2) - remove it >: - symlink(2) - create it > >Well, strictly speaking this aint true on all unices (it may be true for >Sunos and/or Solaris - I just don't know). I think he meant it isn't a regular file. >On most unices it is also possible to lstat() a symbolic link, and on some it is >possible to lchown() and readlink() it. lstat(), readlink() are required to get information on a symlink and are fairly standard. lchown() exists on Unices where chown() follows a symlink. >Unless I am mistaken, later versions of Irix also have lchmod() (which, like lchown(), >has no real meaning, but was added due to the popular demand). lchown() does have real meaning. Ownership of a symlink is needed, particularly in directories like /tmp with sticky bits set. -- mikeh