Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Timo Felbinger <timof@uranos.quantum.physik.uni-potsdam.de>
To: ivan.dolezal@vsb.cz
Subject: Re: chmod on link?
Date: 1998/12/09	[thread overview]
Message-ID: <Pine.LNX.3.96.981209125404.224F-100000@uranos.quantum.physik.uni-potsdam.de> (raw)
In-Reply-To: 366E3AEE.4D39123B@vsb.cz


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





  parent reply	other threads:[~1998-12-09  5:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-12-09  5:00 chmod on link? ivan.dolezal
1998-12-09  5:00 ` Timo Felbinger
1998-12-09  5:00 ` Timo Felbinger [this message]
1998-12-09  5:00   ` Nikola Milutinovic
1998-12-09  5:00     ` Casper H.S. Dik - Network Security Engineer
1998-12-09  5:00       ` Serguei Patchkovskii
1998-12-11  5:00         ` Mike harrelson
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox