0

My server had some issues due to a bug on my server host's end. I restored my server, but ever since then there's been some odd files in my "/" directory.

  • /ý (folder, cannot enter in FileZilla)
  • /initrd.img (system link)
  • /initrd.img.old (system link)
  • /vmlinuz (system link)
  • /vmlinuz.old (system link)
  • /L (Actually a weird L looking symbol that does not copy. File, 0kb)
  • /Ð (Same as above but this one does copy. FIle, 0kb)

Screenshot: Screenshot of "/" directory in FileZilla

What are these files and why did they suddenly appear? Can I safely delete them? Is something wrong with my Ubuntu installation?

Output from ls -la:

total 92
-rwsrwsrwt   1 root root     0 Jan  1  1970 ?
drwxr-xr-x   2 root root  4096 Oct  7 13:59  ??
drwxrwxr-x  24 root 1001  4096 Oct 10 14:53 .
drwxrwxr-x  24 root 1001  4096 Oct 10 14:53 ..
drwxr-xr-x   2 root root  4096 Apr 22 17:56 bin
drwxr-xr-x   3 root root  4096 Apr 22 18:15 boot
drwxr-xr-x  17 root root  4020 Oct 10 14:53 dev
drwxr-xr-x  86 root root  4096 Oct  4 19:19 etc
drwx------   2 root root  4096 Jul 25 17:12 gandi
drwxr-xr-x   3 root root  4096 Jul 19 17:08 home
lrwxrwxrwx   1 root root    35 Apr 22 17:57 initrd.img -> boot/initrd.img-4.4.0-21-lowlatency
lrwxrwxrwx   1 root root    32 Apr 22 17:57 initrd.img.old -> boot/initrd.img-4.4.0-21-generic
drwxr-xr-x  17 root root  4096 Jul 25 16:04 lib
drwxr-xr-x   2 root root  4096 Apr 22 17:56 lib64
drwx------   2 root root 16384 Apr 22 17:26 lost+found
drwxr-xr-x   2 root root  4096 Apr 22 17:57 media
drwxr-xr-x   2 root root  4096 Apr 22 17:57 mnt
drwxr-xr-x   3 root root  4096 Jul 25 16:02 opt
dr-xr-xr-x 167 root root     0 Oct 10 14:53 proc
drwxr-x---   6 root root  4096 Jul 19 17:27 root
drwxr-xr-x  21 root root   680 Oct 10 15:30 run
drwxr-xr-x   2 root root  4096 Jul 19 17:23 sbin
drwxr-xr-x   2 root root  4096 Oct 10 14:53 srv
dr-xr-xr-x  13 root root     0 Oct 10 15:31 sys
drwxrwxrwt   8 root root  4096 Oct 10 15:30 tmp
drwxr-xr-x  10 root root  4096 Apr 22 17:57 usr
drwxr-xr-x  13 root root  4096 Jul 19 17:22 var
lrwxrwxrwx   1 root root    32 Apr 22 17:57 vmlinuz -> boot/vmlinuz-4.4.0-21-lowlatency
lrwxrwxrwx   1 root root    29 Apr 22 17:57 vmlinuz.old -> boot/vmlinuz-4.4.0-21-generic
----------   1 root root     0 Jan  1  1970 ???
  • Can you get a listing of this directory using something other than filezilla? A native shell over ssh, for example. – Spooler Oct 10 '16 at 13:13
  • @SmallLoanOf1M Updated my question to include that. – Swen Oct 10 '16 at 13:37
  • vmlinuz and initrd.img are normal files. Otherwise your system could be compromised, and you might need to re-install and restore from backups. – Tero Kilkanen Oct 10 '16 at 13:39
  • Those look like corrupt files. Run a filesystem check after making sure your disk isn't damaged. – Spooler Oct 10 '16 at 13:44
  • What kind of machine is this? A physical one or a VM? – Spooler Oct 10 '16 at 13:44
0

ls -li

This will give you the inodes of the bad files. Then you can remove them using find.

find -inum n -exec rm {} \;

Do this for each file with the funny name. Replace n with the inode number from the first command. One of those files is actually a directory. You can use rmdir instead of rm for that one.

These are just files that were created with a control character. Can't say how they got there, but I don't think there is anything wrong with your install.

  • The find command you give here might delete more files than you intend to! You should at least add -maxdepth 1, otherwise find will traverse the entire filesystem. There is no guarantee that inodes are unique across the whole filesystem. – G. Sliepen Oct 25 '16 at 13:06
0

Another option is to use Midnight Commander (apt-get install mc). It will allow you to select the strange files with the cursor keys, and just press F8 to remove them. This might be a bit safer if you are not used to low-level tools like find.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.