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: patchkov@acs1.acs.ucalgary.ca (Serguei Patchkovskii) Subject: Re: chmod on link? Date: 1998/12/09 Message-ID: <74mhkm$7le@ds2.acs.ucalgary.ca>#1/1 X-Deja-AN: 420523642 References: <366E3AEE.4D39123B@vsb.cz> <366E7B5A.D45A3979@ev.co.yu> Organization: The University of Calgary Newsgroups: comp.unix.osf.osf1 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). On most unices it is also possible to lstat() a symbolic link, and on some it is possible to lchown() and readlink() it. 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). (readlink(), lstat(), and lchown() are actually required by XPG4 UNIX, so that I am sure they are also supported by Solaris, if not by SunOS). : lrwxrwxrwx SunOS 4/Solaris 2&7 : l--------- Irix (others?) : Some may just use the user's umask() in creating them, (DU)? DU creates symlinks with 0777 regardless of the users' umask. Irix (ay least 5.* and 6.[0-4]) does indeed uses users' umask. Regards, /Serge.P