[Samba] Recent inability to view long filenames stored with scp via samba mount

Jeremy Allison jra at samba.org
Mon Nov 4 22:14:56 UTC 2019


On Sun, Nov 03, 2019 at 06:37:57AM -0500, Michael Lueck via samba wrote:
> I have Samba shares mounted to my Linux workstation. Mostly I access files on the Samba server over the Samba mount. I use mount.cifs to bring up these mounts.
> 
> For a couple of special cases, I use scp to transfer files between the
> server and workstation. Special characters in filenames give sending them
> over the Samba mount trouble, so that is one case I have used scp in place
> of using the Samba mount.
> 
> To back up my Rhythembox music I use scp. I loaded some more music to Rhythembox yesterday, so remembered to back up Rhythembox to the server this morning. The scp command works flawlessly as ever.
> 
> $ bin/rsync_ldslnx01rhythmbox.sh
> sending incremental file list
> 
> sent 268 bytes  received 15 bytes  188.67 bytes/sec
> total size is 1,467,438  speedup is 5,185.29
> sending incremental file list
> Alfred Brendel/
> Alfred Brendel/Beethoven Piano Sonatas Vol I/
> Alfred Brendel/Beethoven Piano Sonatas Vol I/Disc 1 - 01 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": I. Allegro.mp3
>      12,279,216 100%   13.53MB/s    0:00:00 (xfr#1, ir-chk=1025/1221)
> Alfred Brendel/Beethoven Piano Sonatas Vol I/Disc 1 - 02 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": II. Scherzo.mp3
>       2,795,290 100%    2.43MB/s    0:00:01 (xfr#2, ir-chk=1024/1221)
> Alfred Brendel/Beethoven Piano Sonatas Vol I/Disc 1 - 03 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": III. Adagio sostenuto.mp3
>      17,269,725 100%   10.59MB/s    0:00:01 (xfr#3, ir-chk=1023/1221)
> Alfred Brendel/Beethoven Piano Sonatas Vol I/Disc 1 - 04 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": IV: Largo; Allegro risoluto.mp3
>      13,683,591 100%    7.61MB/s    0:00:01 (xfr#4, ir-chk=1022/1221)
> Alfred Brendel/Beethoven Piano Sonatas Vol I/Disc 1 - 05 - Piano Sonata No. 32 in C minor, op. 111: I. Maestoso; Allegro con brio e appassionato.mp3
>       8,842,054 100%    5.77MB/s    0:00:01 (xfr#5, ir-chk=1021/1221)
> Alfred Brendel/Beethoven Piano Sonatas Vol I/Disc 1 - 06 - Piano Sonata No. 32 in C minor, op. 111: II. Arietta; Adagio molto, semplice e cantabile.mp3
>      16,239,680 100%    8.41MB/s    0:00:01 (xfr#6, ir-chk=1020/1221)
> 
> 
> (and so on...)
> 
> ssh to the sever to validate the files got there...
> 
> mdlueck at ldslnx01:/srv/shares/data/Nodes/jacob/home/mdlueck/Music/Alfred Brendel$ find
> .
> ./Beethoven Piano Sonatas Vol I
> ./Beethoven Piano Sonatas Vol I/Disc 1 - 01 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": I. Allegro.mp3
> ./Beethoven Piano Sonatas Vol I/Disc 1 - 02 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": II. Scherzo.mp3
> ./Beethoven Piano Sonatas Vol I/Disc 1 - 03 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": III. Adagio sostenuto.mp3
> ./Beethoven Piano Sonatas Vol I/Disc 1 - 04 - Piano Sonata No. 29 in B-flat major, op. 106 "Hammerklavier": IV: Largo; Allegro risoluto.mp3
> ./Beethoven Piano Sonatas Vol I/Disc 1 - 05 - Piano Sonata No. 32 in C minor, op. 111: I. Maestoso; Allegro con brio e appassionato.mp3
> ./Beethoven Piano Sonatas Vol I/Disc 1 - 06 - Piano Sonata No. 32 in C minor, op. 111: II. Arietta; Adagio molto, semplice e cantabile.mp3
> 
> 
> Good!
> 
> 
> View across the mount.cifs share to my workstation...
> 
> 
> mdlueck at jacob:/mnt/ldslnx01/data/Nodes/jacob/home/mdlueck/Music/Alfred Brendel$ find
> .
> ./Beethoven Piano Sonatas Vol I
> ./Beethoven Piano Sonatas Vol I/DTCML9~Y.MP3
> ./Beethoven Piano Sonatas Vol I/DQIP6H~S.MP3
> ./Beethoven Piano Sonatas Vol I/DKU9ZS~P.MP3
> ./Beethoven Piano Sonatas Vol I/D4K1AV~O.MP3
> ./Beethoven Piano Sonatas Vol I/DIVFAH~2.MP3
> ./Beethoven Piano Sonatas Vol I/DWMU18~G.MP3
> ./Beethoven Piano Sonatas Vol I/DDDAFP~U.MP3
> ./Beethoven Piano Sonatas Vol I/DIYJ3G~3.MP3
> ./Beethoven Piano Sonatas Vol I/DQYYDL~5.MP3
> 
> 
> 
> Yikes!! Why is Samba not showing the long version of file names actually successfully on the server suddenly?
> 
> Did something go wrong after yesterday's update?

Nope. Your filenames have the ':' character in them,
which is invalid for SMB2 filenames. So Samba
must mangle them to make them available to SMB2
clients.

The only way you can see these filenames 'as they
are' on the server is if you mount with SMB1+posix
extensions, which doesn't mangle any names. This
is not currently recommended as we're trying to
remove SMB1 support.

My guess is yesterday you were mounting with SMB1+unix-extensions
and today you're mounting with SMB2+ (the default).

Jeremy.



More information about the samba mailing list