Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!samsung!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.questions Subject: Re: symbolic link filemodes unchangeable. Keywords: ln, links, symbolic Message-ID: <1989Nov22.234630.6933@virtech.uucp> Date: 22 Nov 89 23:46:30 GMT References: <1989Nov16.004352.6195@virtech.uucp> <24818@sequent.UUCP> <363@m1.cs.man.ac.uk> Organization: Virtual Technologies Inc. Lines: 32 In article <363@m1.cs.man.ac.uk>, mario@r3.cs.man.ac.uk writes: > In article <1989Nov16.004352.6195@virtech.uucp> Conor P. Cahill writes: > >> Why can't you change the filemodes of a symbolic link ? : > > > >Because the modes of the link are never used. Restricting the write > >access on the link file does not restrict the write access on the > >file that it is linked to. That is why there is no lopen(), or lchmod() > >system call (would be similar to lstat()). > > But a symbolic link contains information (the path where the file can > really be found). So why can't I protect that information in the same > way as I can protect all other information in the system? [things one could do with symbolic link permission bits deleted] Not that I was there when symbolic links were designed, but here goes: The symbolic link mechanism is designed to supplement the hard link mechanism wheree the hard link mechanism was not sufficient (like between file systems). The hard link has only 1 set of permission bits, reguardless of the name used to access the file. Since the symbolic link has it's own inode, the only way to have it appear the same as a hard link is to ignore the permission bits of the symbolic link file and use the permission bits of the file it points to. -- +-----------------------------------------------------------------------+ | Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 ! | Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 | +-----------------------------------------------------------------------+