Path: utzoo!attcan!uunet!mcsun!ukc!mucs!mario@r3.cs.man.ac.uk From: mario@r3.cs.man.ac.uk Newsgroups: comp.unix.questions Subject: Re: symbolic link filemodes unchangeable. Keywords: ln, links, symbolic Message-ID: <363@m1.cs.man.ac.uk> Date: 17 Nov 89 17:00:04 GMT References: <1989Nov16.004352.6195@virtech.uucp> <24818@sequent.UUCP> Sender: news@cs.man.ac.uk Organization: University of Manchester, UK Lines: 28 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? --no read permission would prevent you from finding what the symbolic link pointed to --no search(execute) permission would prevent you from following the symbolic link, and --if you could open the symbolic link for writing (say, to redirect the link without removing it), no write permission would prevent you from doing that too. All seems fairly obvious (except maybe the last point; maybe something deep depends on symbolic links being immutable; also, you'd need to extend open() to open the link not the target). So why isn't it like this? Mario Wolczko ______ Dept. of Computer Science Internet: mario@cs.man.ac.uk /~ ~\ The University USENET: mcvax!ukc!man.cs!mario ( __ ) Manchester M13 9PL JANET: mario@uk.ac.man.cs `-': :`-' U.K. Tel: +44-61-275 6146 (FAX: 6280) ____; ;_____________the mushroom project___________________________________