[CentOS] [SOLVED] Cannot remove a file

Mon Dec 12 12:10:58 UTC 2011
Theo Band <theo.band at greenpeak.com>

On 12/12/2011 01:04 PM, Mogens Kjaer wrote:
> On 12/12/2011 12:45 PM, Theo Band wrote:
>> Any ideas on what else I can do to get rid of this file?
>>
> Does
>
> man lsattr
> man chattr
>
> help you?
>
> Mogens
>
Thanks this is indeed the the answer:

# lsattr aquota.user
----i--A----- aquota.user

       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 supe-
       ruser  or  a process possessing the CAP_LINUX_IMMUTABLE
capability can set or clear this
       attribute.

# chattr -i aquota.user
# rm aquota.user
rm: remove regular file `aquota.user'? y

Learned something today :-)

Theo