&gt;This is not a bug, but rather a consequence of how the Unix filesystem works.<p>Yeah.  this is something that really confuses new UNIX users.<p>But it has absolutely nothing to do with sed.<p>If you have write-access to a directory, you can delete any file in that directory.  You can also create a new file in that directory with the same name as the old file.   So write-permission on a directory is a bit like write-permission on everything beneath that directory.<p>The exception is the sticky bit...  &#x2F;tmp directories are traditionally 1777, meaning all can read, write and traverse, but the  1, the &#x27;sticky bit&#x27; means that you can&#x27;t delete or overwrite files you don&#x27;t own.<p>With the sticky bit set, the directory functions the way most non-UNIX users expect; e.g. if I create a file and make it writable only to me, nobody else can overwrite it.