Re: Making files unremovable by root Joost Kremers wrote:
> Steven J Masta wrote:
>> Fred FLintstone wrote:
>>> Is there a way to make a file unremovable by root?
>>> I have read the chmod man page but don't find anything there.
>>>
>>> Anyone else got any ideas?
>> Other than mounting the filesystem read-only ... no.
>
> actually, that's only partially true. on ext2 file systems, you can use
> chattr to set the i attribute, which makes the file unmodifiable and
> undeletable, even by root. AFAIK ext2/3 is the only file system that
> supports this, though.
>
But root has the ability to remove the attribute (chattr -i file). It is
not possible to make a file really non removable by root. But why would
you like that?
Olive |