can root somehow create a immutable file in a non-uid-0 hierarchy?

Skunk Worx skunkworx at verizon.net
Sat Apr 14 05:34:59 UTC 2007


Anthony Messina wrote:
> Skunk Worx wrote:
>>
>> Suppose I am root/UID 0. Is there a way to create a file in someone
>> else's (non-uid-0) FS hierarchy and have it be immutable? No rename, etc.?
>>
>>
> not sure if this is what you're looking for, but how about chattr?
> 
> man chattr:
> " A file with the ‘i’ attribute cannot be modified: it cannot be deleted
> or  renamed,  no  link  can  be created to this file and no data can be
> written to the file.  Only the superuser or a  process  possessing  the
> CAP_LINUX_IMMUTABLE capability can set or clear this attribute."
> 
> 

Thanks Anthony. This looks good.

---
John




More information about the users mailing list