[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: litte understanding problem with test
From: |
Jim Meyering |
Subject: |
Re: litte understanding problem with test |
Date: |
Fri, 18 May 2007 16:03:54 +0200 |
address@hidden wrote:
> Thanks for your fast answer :)
> I tried it as user and it works, seems to be a root issue
>
> address@hidden:/tmp$ echo foo>file && chmod 444 file && test ! -w file &&
> echo "no write permission"
> no write permission
> address@hidden:/tmp# echo foo>file && chmod 444 file && test ! -w file &&
> echo "no write permission"
> address@hidden:/tmp#
Well, it's telling the truth if you're root,
since it *can* write that file, in spite of the permission bits.