Skip to contentSkip to conversation

chattr non-root users

DISCUSSION Borislav Petkov 1 participant 1 message Jan 22, 2005 VFS

lore
Share & tools
lore
#0 lore raw

Hi there,

I'm trying to do chattr +i <filename> as a non root user and my /home is ext3 (/dev/hda3 on /home type ext3 (rw,noatime,data=journal,commit=600)), but chattr returns:
chattr: Operation not permitted while setting flags on <filename>

Root does not suffer under such restrictions, so can anyone enlighten me on the reasons behind not allowing non root users to make files in their homes immutable. Searching the archives didn't reveal much except that it confirmed my speculations that not allowing file attribute manipulations by non-root users could be a kind of security measure. hm..

Thanks in advance,
Boris.

"... i The 'i' attribute stands for "immutable", this offers a level of protection against deletion. The 'i' attribute can only be added/removed to/from a files attribute by the 'root' user."[1]

[1] "Understanding chattr." MeanPC, 2004.
<http://www.meanpc.com/linux/understanding_chattr.htm>