Seu arquivo tem o conjunto de atributos estendidos immutable
, e é por isso que você não pode excluí-lo.
lsattr
retorna os atributos estendidos no arquivo:
$ lsattr model/DailyUpdateClass.class
-u-Diad--j------ DailyUpdateClass.class
Você precisará decifrar todas as letras ( -u-Diad--j
)
A página man do lsattr
dirá para você ver a página man para chattr
para uma descrição dos atributos estendidos. Eu listei os relevantes aqui:
When a file with the u
attribute set is deleted, its contents are
saved. This allows the user to ask for its undeletion. Note: please
make sure to read the bugs and limitations section at the end of this
document.
When a directory with the D
attribute set is modified, the changes
are written synchronously on the disk; this is equivalent to the
dirsync
mount option applied to a subset of the files.
O D
one é um pouco preocupante - aparentemente só é usado em diretórios, mas você tem um arquivo.
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.
A file with the a
attribute set can only be open in append mode for
writing. Only the superuser or a process possessing the
CAP_LINUX_IMMUTABLE
capability can set or clear this attribute.
A file with the d
attribute set is not candidate for backup when
the dump(8) program is run.
A file with the j
attribute has all of its data written to the ext3
or ext4 journal before being written to the file itself, if the
filesystem is mounted with the data=ordered
or data=writeback
options. When the filesystem is mounted with the data=journal
option all file data is already journalled and this attribute has no
effect. Only the superuser or a process possessing the
CAP_SYS_RESOURCE
capability can set or clear this attribute.
Para corrigir isso, use chattr
. Por exemplo, para remover os atributos imutáveis e anexados:
# chattr -ia model/DailyUpdateClass.class