I have a file which can't deleted by rm.
/var/www/html/symfony4proj/var/cache/pool/+m7exph6c3/X/3/tCcgRMw5TEmYO-kHpJ0t
file satus
-rw-r--r-- 1 app app 2781 Jan 1 1970 tCcgRMw5TEmYO-kHpJ0t
Change permission before deleting.
[root@jp1 3]# chmod 0777 tCcgRMw5TEmYO-kHpJ0t`
-rwxrwxrwx 1 app app 2781 Jan 1 1970 tCcgRMw5TEmYO-kHpJ0t
then, try to delete
[root@jp1 3]# rm tCcgRMw5TEmYO-kHpJ0t`
rm: remove regular file `tCcgRMw5TEmYO-kHp0t'? y
It's not deleted and permission setting is return back to.
-rw-r--r-- 1 app app 2781 Jan 1 1970 tCcgRMw5TEmYO-kHpJ0t
[root@jp1 3]# which rm
alias rm='rm -i'
/bin/rm
Is there any places I should check???
ls -i
if inode number changes afterrm
. Maybe something recreates the file.[root@jp1 3]# ls -i 9702169 tCcgRMw5TEmYO-kHpJ0t
inode doesn't change beforerm
and afterrm
mv tCcgRMw5TEmYO-kHpJ0t test
. then There are two files like thisls -i 9762374 tCcgRMw5TEmYO-kHpJ0t 9702169 test
Original file are mv totest
then new file are created.