0

I've got a very puzzling problem. When rm -rf'ing .config/chromium, I got this error:

rm: cannot remove 'chromium/Default': Directory not empty 

Sure enough, when I ls -l chromium/Default, I see:

-?????????? ? ? ? ? ? TransportSecurity 

So, I tried chmod a+rx chromium/Default, and I see:

chmod: cannot access 'chromium/Default/TransportSecurity': No such file or directory 

I can't rm the file. If I touch TransportSecurity, I get another file with the same name and same permissions.

The directory's permissions, to confirm, are: drwxr-xr-x

I can't remove the files (three identical ones now). They survive reboots and being root doesn't help.

Anyone seen this or have suggestions for how to investigate?

Per @Deathgrip's suggestion below, running ls -lb chromium/Default reports:

ls: cannot access 'Default/TransportSecurity': No such file or directory ls: cannot access 'Default/TransportSecurity': No such file or directory ls: cannot access 'Default/TransportSecurity': No such file or directory total 0 -?????????? ? ? ? ? ? TransportSecurity -?????????? ? ? ? ? ? TransportSecurity -?????????? ? ? ? ? ? TransportSecurity 

Running rm -i *TransportSecurity* tells me:

rm: cannot remove 'TransportSecurity': No such file or directory 
3
  • 1
    You have a directory name with non-printable characters. Try ls -bl chromium/Default and you may see something a bit different. Or ls -l chromium/Default | cat -vet. You could try an rm with wildcards and the -i option to be interactive and ask for confirmation. rm -irf chromium/Default/*TransportSecurity*. Commented Jun 14, 2017 at 4:06
  • 6
    Either that or you have a corrupt filesystem and need to run fsck Commented Jun 14, 2017 at 4:29
  • 1
    @muru, please move your comment to a response so I can hit the green arrow. fsck repair did the trick. The file got moved into lost+found, with proper permissions, whereupon it was deletable. Commented Jun 14, 2017 at 14:30

1 Answer 1

0

No, (in this specific case) chromium is not spying on you.

Most times I have encountered an 'udeletable' file it has been due to some corruption of the disk or the filesystem sitting on top of it. In my experience it is often caused by bad sectors on the hard disk. This is not the only cause though.

The question marks in the output of ls can be a symptom of a corrupt filesystem. If this is the case it is fairly easy to remedy. You can start by running lsblk, this will show you the block devices on your system and where they are mounted. The right column shows you the mount point. Find the one your .config directory is under (probably / or /home). In the leftmost column you can find the corresponding block device (/dev/sdXy). You will then want to run the following command (fsck claims that it supports running against the mount point but this is no my experience).

# fsck /dev/sdXy 

If this is a partition that is currently mounted fsck will complain that it will probably further corrupt your filesystem. This is normal behaviour. If this is a filesystem you cannot unmount (e.g. /), check the file /etc/fstab. Make sure the last field of the entry corresponding to your block device is non-zero. See the man page for whether it should be 1 or 2.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.