Photos in DCIM folder visible on phone, not visible via USB I use a RedMi 3S (Android 6.0.1), non-rooted and fully updated.

I have a large number of photographs in my DCIM/Camera folder (in my "Internal Storage"). They're visible via the Gallery app, File Manager, and even visible and accessible via an SFTP server that I set up on the phone.

However, if I connect the phone to a PC with a USB cable, and choose either PTP or MTP (Files or Photos respectively) - I don't see these photos. I do see the DCIM/ folder, and one of the other subfolders there (named Screenshot) but DCIM/Camera is suspiciously missing.

Why is this happening and how can I transfer my photos over USB?

Notes:


Unlike the highly related question, the issue here is not the out-of-date media manager database; I just performed a "rescan", and it didn't change anything.
As you point out you're using Linux, I strongly recommend taking a look at adbfs. You can use that to mount the entire device to your computer and access it as if it were local. I'm using it for years and am very satisfied with it (including the support).


download/clone the repo
follow the install instructions (on the linked page)
create yourself a "mount point" (where you want to see the Android device, e.g. /home/foobar/droid)
attach your device (USB debugging enabled) via USB
verify with adb devices that it's there
mount it: adbfs /home/foobar/droid
access everything the non-root user has access to – including the photos – read/write
when done, unmount: fusermount -u /home/foobar/droid


(of course, once it's working you'll only need to repeat steps 5/6 to 8)

When mounted, it's available like any local file system – so you can access it from the shell, or use a graphical file explorer, or access it with whatever programs you want. As Irfan pointed out: MTP sucks (isn't it a MS product?) – but adbfs never let me down.