Re: Delete a file THAT big? Surely you are joking.

[prev] [thread] [next] [lurker] [Date index for 2006/12/19]

From: jrodman
Subject: Re: Delete a file THAT big? Surely you are joking.
Date: 22:22 on 19 Dec 2006
On Tue, Dec 19, 2006 at 09:53:56AM +0200, Yossi Kreinin wrote:
> Yeah, that's better - no need to terminate processes! Fuck those
> processes.  They think they can use my files, ha! But no, I won't
> *terminate* them.  That punishment is too light. I will remove the
> files they are using and then lay back and enjoy their suffering! "Oh,
> where's my file?? I know it was right here! Help!!" Buwahahaha!!

Your whole thesis seems to be predicated on the idea of the seperate
programs as seperate agents.  Perhaps there is some value to this
thesis, but I haven't seen a good system which operates on this model,
so naturally distrust it.

UNIX operates on the model that the agent is a user.  Thus, permissions
allow users to control who can modify the user's files.  Processes are
just tools of the agent: the user.

Thus, the user can always, via whatever tool, modify the user's files.
If there are files that the program shouldn't have modified at runtime,
then they should probably be installed in a way that they are not owned
by the agent who will make use of the program.

This isn't rocket science.  UNIX relies on file permissions to resolve
the "horrible scenarios" you describe which are not resolved by the
semantics of unlinking.

If a program needs to create a new file that the user who ran the
program should not modify, the programmer has a few options. 

1) Document the file and tell the user not to modify it.  Files don't
   get automagically modified.
2) Create the file write-only, and cross your fingers.
3) Do some kind of suid hackery.

But in the normal situation, this is just not a problem, people don't go
and rewrite datafiles with different contents.  They truncate logs, they
edit preferences files, and so on, and if your program cannot handle
this, then it sucks, and is hateful.

So perhaps it is hateful that rm counterintuitively doesn't necessarily
cause a file to be removed, or removed right away.  This matters when
you are out of disk space, and so perhaps I am unsympathetic because I
have never been out of disk space.  Otherwise, I think it doesn't really
matter, and offers a lot of benefits.

-josh
There's stuff above here

Generated at 03:01 on 20 Dec 2006 by mariachi 0.52