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* could do this.
The reason is quite simple -- having several names for a directory
would cause the data structure to turn from a directory tree
into a directory graph (possibly a cyclic one).
Few scenarious to ponder:
- Where a 'cd ..' should lead you (who's the parent?)
- For how long would find(1) run on / if you did
a 'ln /usr/local /usr'
Both of the above scenarious are no problem for symlinks
of course (unless you use find -follow which is your problem).
Cheers,
--
Oron Peled Voice/Fax: +972-4-8228492
[EMAIL PROTECTED] http://www.actcom.co.il/~oron
ICQ UIN: 16527398
"Normally the saying is: 'Fast, Reliable, Cheap. Pick any two.' But with
Linux you can pick all three!"
--from a Slashdot post
=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]