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: Timo Felbinger Subject: Re: chmod on link? Date: 1998/12/09 Message-ID: #1/1 X-Deja-AN: 420417233 References: <366E3AEE.4D39123B@vsb.cz> To: ivan.dolezal@vsb.cz Content-Type: TEXT/PLAIN; charset=US-ASCII Organization: University of Potsdam Mime-Version: 1.0 Reply-To: Timo.Felbinger@quantum.physik.uni-potsdam.de Newsgroups: comp.unix.osf.osf1 On Wed, 9 Dec 1998 ivan.dolezal@vsb.cz wrote: > Thanks for your asset, but I can see in my Digital Unix's root > > lrwxr-xr-x 1 root system 7 Oct 4 16:09 var -> usr/var > > Both of them are directories (so it can't be a hard link). What do you mean by "both"? On my system, /var is a soft link to /usr/var, while /usr/var is (a hard link of) a directory. > And, it would also mean that I can't deny anybody to erase the link that > I made and substitute it with his/her link but just make the whole > directory containing the link rewritable by the person responsible > enough to not damage the link. It could be very dangerous indeed! Someone who has write access to a directory can always remove entries in this directory, regardless of type, ownership and permissons. You don't want to have / writable for anyone but root, do you? As a minor correction of my previous post, soft links are technically files containing a path, so they have an inode of their own. However, the permissions in this inode are not used, and DU won't create more than one hard link to a soft link: after touch a ln -s a b ln b c c will be another hard link for a. BTW, this is different e. g. on a Linux system: there, c will become a second hard link for the soft link b! Regards, Timo -- Timo Felbinger (Timo.Felbinger@quantum.physik.uni-potsdam.de) Quantum Physics Group Institute of Physics University of Potsdam, Germany