'ls' not listing directories starting with 'A' in Linux

maj

maj

Soldato
Joined
19 Jul 2010
Posts
2,584
Location
Durham
As title says I've got an issue where my media folder that has my Anime rips isn't visible in Linux. This happens on Ubuntu and Linux Mint. With Ubuntu I'm just using putty to connect and mount the Windows share as the VMs are running Ubuntu Server. With Linux Mint I've used both terminal and the file explorer in the GUI to view the contents of the mount point.

The only way I can get the folder to appear is if I create an empty folder named 'A' (but that isn't visible in Linux either). I've also tried creating the folder from the Linux side and whilst it is visible on my Windows server, it still isn't visible on Linux. I've also noticed that on putty if I 'cd' to another folder that has a folder beginning with 'A' in it then that does show in both putty and in file explorer.

Code:
/media/mount/Anime doesn't show
/media/mount/Folder/Anotherfolder does show.


'ls -a' doesn't show the folder either.

Any ideas? It seems to be something to do with the folder being at the root of the Windows drive.
 

maj

maj

Soldato
OP
Joined
19 Jul 2010
Posts
2,584
Location
Durham
It sounds suspiciously like this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1572132 (though it seems like it's a bug with Samba V2 - upstream bug is here: https://bugzilla.samba.org/show_bug.cgi?id=13107).

Are you able to cd into the missing folders even though you can't list them?

Nice find and does seem very similar to what I'm experiencing. I can still cd into the missing folder yeah but when I go to add it as a source in Plex, Plex can't see it unless I create a blank 'A' folder in same location.
 

maj

maj

Soldato
OP
Joined
19 Jul 2010
Posts
2,584
Location
Durham
It seems that kernel 4.19.0 included the patch by Aurelien Aptel mentioned in the upstream bug; if you can do so without breaking something you need, I'd just try and upgrade your distro to a version with a recent enough kernel.

Thanks that seems to have solved it. Found a tutorial on youtube which explained it in very easy steps. Can't remember what I was on before (whatever standard kernel is for Ubuntu 18.04) but I'm now on 5.1.15-050115-generic and if I do 'ls' at my mount point I can see the missing folder.

Makes me wonder why it wasn't upgraded when I updated all packages but never mind.

Thanks again for your help.
 
Associate
Joined
7 Aug 2017
Posts
415
Location
location location
With Ubuntu, the standard kernel for the original 18.04 LTS (18.04.1) is 4.15; if you use the hardware-enablement (HWE) option (or downloaded 18.04.2) you'll have kernel 4.18. In August 18.04.3 will have kernel 5.0.

You have the choice of moving from LTS-only releases to the standard ones (e.g. 19.04) to get the latest kernels (and packages) quicker, or you can do as you've done and stick with LTS and manually install a newer "mainline" kernel (such as 5.1.15) or with the assistance of a utility like UKUU.

If you want to have Ubuntu offer you upgrades to 19.04/19.10 rather than just the LTS versions, you'll need to have this set in your "Software & Updates" settings - see the "Notify me of a new Ubuntu version" option under the Updates tab.
 
Associate
Joined
7 Aug 2017
Posts
415
Location
location location
For clarity for anyone not digging into the details - the problem isn't actually that Linux clients cannot list directories starting with "A".

The problem is that root-directory Samba v2 (or higher) shares from Windows hosts will have their first two entries ignored by Linux clients using the affected versions of Samba v2; it's related to handling of the "." and ".." entries. This was an obscure bug before Samba v1 security issues forced a change on Windows hosts to default to v2 or later, now this is encountered more often.
 
Back
Top Bottom