How can I delete this directory? I did fsck
and it has found some garbage, I looked through these files and there wasn't something important. So I've tried to delete the contents of /lost+found
and everything has gone except this strange directory. I thought that putting it to /tmp
(I can move that dir across the volume) will erase it on next reboot but it's still there after both reboot and another fsck
.
As it seems like the problem is low level and playing with ownership and permissions is not enough, I've made you able to reproduce the issue by yourself. Enjoy!
- This is safe, you will be able to umount image to get rid of these directories on your machine;
- This s not iso-image, this is the result of
dd if=/dev/sda1 of=/files/broken.iso
;
I've made a 15MB archive with the image which is ~1.2GB. You can download and ply with it with the following commands:
cd /tmp
wget https://dl.dropboxusercontent.com/u/22701362/broken.tar.xz
tar xvf broken.tar.xz
mkdir test
sudo mount broken.iso test
cd test
There would be two directories (During the creation of that image it appears that there are two such directories on my disk):
/tmp/test> tree
.
├── 1
│ └── plexus-component-annotations-1.5.5.jar.sha1 [error opening dir]
└── 2
└── #1589030 [error opening dir]
4 directories, 0 files
Good luck with removing these two directories:
/tmp/test> sudo rm -rf *
rm: cannot remove '1/plexus-component-annotations-1.5.5.jar.sha1': Operation not permitted
rm: cannot remove '2/#1589030': Operation not permitted
/tmp/test> sudo chown -R root:root *
chown: changing ownership of '1/plexus-component-annotations-1.5.5.jar.sha1': Operation not permitted
chown: cannot read directory '2/#1589030': Permission denied
/tmp/test> sudo chmod -R 777 *
chmod: changing permissions of '1/plexus-component-annotations-1.5.5.jar.sha1': Operation not permitted
chmod: changing permissions of '2/#1589030': Operation not permitted
chmod: cannot read directory '2/#1589030': Permission denied
/tmp
on the same volume? Could you post the output ofdf
? Also, please post the output ofsudo perl -MFile::Path -e 'rmtree("/tmp/foo") || die "$!"'
just in case we get a more informative error message.df
output shows us that your /tmp` is actually a normal directory on/
and not a tmpfs which is the default setup. That's surprising, but explains both why you could copy the dir to/tmp
and why it survives reboots. Theperl
output doesn't really add much, no, but it was worth a shot. I'm clutching at straws here./tmp
is a normal directory by default. This is done to prevent filling it up to 100% and to save RAM. It is cleaned up during the startup. This behaviour exists for a long time.