Re: Hard linking to directories

2005-06-08 Thread Eli Marmor
Shachar Shemesh wrote: > Hi all, > > Does anyone know WHY only root can create hard links to directories? > What is the attack/problem this permission restriction is trying to solve? link(2) and unlink(2) are very limited, probably because somebody was too lazy or too paranoid. Originally, in t

Re: Hard linking to directories

2005-06-08 Thread Oron Peled
On Wednesday 08 June 2005 20:52, Shachar Shemesh wrote: > Does anyone know WHY only root can create hard links to directories? > What is the attack/problem this permission restriction is trying to solve? Letting root do this is a Linux extension to the original Unix semantics in which *nobody* co

Re: Hard linking to directories

2005-06-08 Thread shimi
On Wed, 2005-06-08 at 23:02 +0300, shimi wrote: > On Wed, 2005-06-08 at 21:39 +0300, Shachar Shemesh wrote: > > Alon Altman wrote: > > > > > On Wed, 8 Jun 2005, Shachar Shemesh wrote: > > > > > >> Hi all, > > >> > > >> Does anyone know WHY only root can create hard links to directories? > > >> Wh

Re: Hard linking to directories

2005-06-08 Thread Shachar Shemesh
shimi wrote: My assumption: if you hard-link to a file not owned by you, inside a directory you do have write access to (otherwise you can't create the link), the file will of course be identical to the original file (it _is_ a hard-link). Meaning it will have the same owner, same permissions, a

Re: Hard linking to directories

2005-06-08 Thread shimi
On Wed, 2005-06-08 at 21:39 +0300, Shachar Shemesh wrote: > Alon Altman wrote: > > > On Wed, 8 Jun 2005, Shachar Shemesh wrote: > > > >> Hi all, > >> > >> Does anyone know WHY only root can create hard links to directories? > >> What is the attack/problem this permission restriction is trying to

Re: Hard linking to directories

2005-06-08 Thread Shachar Shemesh
Alon Altman wrote: On Wed, 8 Jun 2005, Shachar Shemesh wrote: Hi all, Does anyone know WHY only root can create hard links to directories? What is the attack/problem this permission restriction is trying to solve? Because only root can unlink a non-empty directory? I was hoping to lear

Re: Hard linking to directories

2005-06-08 Thread Alon Altman
On Wed, 8 Jun 2005, Shachar Shemesh wrote: Hi all, Does anyone know WHY only root can create hard links to directories? What is the attack/problem this permission restriction is trying to solve? Because only root can unlink a non-empty directory? Alon -- This message was sent by Alon Alt

Hard linking to directories

2005-06-08 Thread Shachar Shemesh
Hi all, Does anyone know WHY only root can create hard links to directories? What is the attack/problem this permission restriction is trying to solve? Shachar -- Shachar Shemesh Lingnu Open Source Consulting ltd. Have you backed up today's work? http://www.lingnu.com/backup.html =