On Mon, Mar 3, 2008 at 9:19 AM, Smylers <[EMAIL PROTECTED]> wrote:
> demerphq writes:
>
>  > It turned out the problem is that when the tests are root it seems to
>  > be not possible to create a directory that is not writeable by root.
>
>  I think that can be reduced to: It isn't possible to create a directory
>  that is not writeable by root.  The whole point of root is that as the
>  super-user it can do anything!

(I know this is not the point of the conversation, but file this away
as it might be useful to you some day.)
As part of being able to do anything, root *can* make a directory that
it cannot write to.

Enter the immutable flag:

[EMAIL PROTECTED] ~]# mkdir unwritable
[EMAIL PROTECTED] ~]# chmod 000 unwritable/
[EMAIL PROTECTED] ~]# touch unwritable/a
[EMAIL PROTECTED] ~]# chattr +i unwritable/
[EMAIL PROTECTED] ~]# touch unwritable/b
touch: cannot touch `unwritable/b': Permission denied
[EMAIL PROTECTED] ~]# chattr -i unwritable/
[EMAIL PROTECTED] ~]# touch unwritable/c

for more info:
man chattr
man lsattr

--bradoaks

Reply via email to