LWN.net Logo

Standards, the kernel, and Postfix

Standards, the kernel, and Postfix

Posted Aug 21, 2008 15:43 UTC (Thu) by foom (subscriber, #14868)
In reply to: Standards, the kernel, and Postfix by adegert
Parent article: Standards, the kernel, and Postfix

> ln /etc/shadow /tmp/myfile
> you can create that link, but you can't delete it afterwards (only root can do that)

Wow, that's insane!

I'd never thought about this issue of hardlinks...but it kinda seems bad that
you can create a file  owned by another user.


(Log in to post comments)

Standards, the kernel, and Postfix

Posted Aug 22, 2008 23:44 UTC (Fri) by giraffedata (subscriber, #1954) [Link]

it kinda seems bad that you can create a file owned by another user.

You can't create a file owned by another user. But you can create a directory entry that points to a file owned by another user.

It all seems strange compared to what you can do with symbolic links, but if you think about the early systems that didn't have symbolic links, you can see how useful it is.

I think what would have given me pause in the pre-symbolic-link days was not that I could keep a pointer to your file in my directory, but that I could prevent you from deleting that file. So while I can't create a file owned by you, I can force you to keep owning one that only I am using. If the system does accounting, you have to pay for the space.

Altogether, I think Unix should have either made files and their names completely separate, like VMS, or completely merged, like NTFS. The intermediate thing has too many surprises.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds