[BLUG] Unix conventions for controlling file access
Brian Wheeler
blug_at_mailman.cs.indiana.edu
Fri, 13 Jul 2007 12:18:20 -0400
On Fri, 2007-07-13 at 11:56 -0400, Dave Monnier REN-ISAC wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Brian Wheeler wrote:
>
> >> Corrupted how?
>
> I'm sure the sky is the limit. It's a file like any other that's had its
> metadata removed from the directory no? Sounds like a bad idea in general.
> To each their own obviously.
>
I'm not really defending the practice :) I don't like it when processes
do it because disk usage isn't accountable via du and/or ls. But
processes have been doing it for ages.
In any case, the files are ok (and only as corruptible as any other file
is) because the only metadata that's removed is the name and the inode
number (that's all that's in a directory entry). The "important stuff"
like ownership, permissions, size, block lists, number of links, etc are
all stored in the inode itself.
When the number of links is 0 and there are no more processes using the
inode, then the blocks are deallocated. But up until that point, the
inode (and its data) are just like every other file, so its not any more
dangerous than any other file.
Brian