lkml.org 
[lkml]   [1999]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Why is chmod(2)?
Date
Alex Nicolaou <anicolao@cgl.uwaterloo.ca> wrote:
[...]
> Hmm, I learned something new today. Why can a file with mode 000 be opened
> by root? This facility seems pointless since root can always chmod the
> file?

Because the chmod is intrusive, and what should be a simple read operation
has now turned into a write-read-write operation.

For example, you're backing up a filesystem with 000 files on it. Does tar
*really* have to play with the inode (and thus change the ctime) just to
read a file to back it up? What if it's on a read-only filesystem?

Having the sort of semantics that require this sort of fiddling just gets in
the way, and I'm not convinced it gains anything.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [from the cache]
©2003-2011 Jasper Spaans