Amarok Acquitted, Samba Owns Up
In my previous post I smeared Amarok unjustly by claiming that it was not dealing with unicode filenames. In my defense, I thought this was the case because everything else seemed fine. However, events have transpired that remove the blame from Amarok, and I apologise (the stuff about podcasts and m4a files is still true though).
I have been holding off letting my FC4 server update its packages for a while, so yesterday I did the update and rebooted it and did the standard checking that the mail server and all that had come back up successfully. All was groovy, except that when I went to listen to some music from the server, the media player complained that it couldn’t access the files. Checking the share, I could see the files, but couldn’t do anything with them. Just for fun, I swapped back to smbfs and bingo, it worked again. Here’s an example of the problem from my Ubuntu laptop connecting to the FC4 Samba share:
$ sudo mount -t cifs //server/share /mnt/music -o \ username=[myuser],domain=[mydomain],uid=[myuser],gid=[mygroup] Password: $ file /mnt/music/test.mp3 /mnt/music/test.mp3: ERROR: cannot read`/mnt/music/test.mp3′ (Permission denied) $ ls -l /mnt/hde1/test.mp3 -rwxrwSrwt 1 [myuser] [mygroup] 5019629 2006-07-31 11:12 /mnt/music/test.mp3
If I simply changed to smbfs:
$ sudo mount -t smbfs //server/share /mnt/music -o \ username=[myuser],domain=[mydomain],uid=[myuser],gid=[mygroup] Password: $ file /mnt/music/test.mp3 /mnt/music/test.mp3: MP3 file with ID3 version 2.4.0 tag $ ls -l /mnt/music/test.mp3 -rwxr-xr-x 1 [myuser] [mygroup] 5019629 2006-07-31 11:12 /mnt/music/test.mp3
However, with smbfs I couldn’t see unicode filenames and I felt at the mercy of its unsupported nature and previous flakiness. Thus started a number of hours of googling and forum and mailling list posting to try and find out what was going on. Of course, one of the packages that had been updated was the Samba server, which had gone to 3.0.23a, so it was a primary culprit. This suspicion was proved correct when I finally managed to fight my way through the gmane posting interface and get a message onto the samba list and one of the devs, Jeremy Allison, promptly confirmed that it was a bug in the server. In fact, he had already fixed the bug. Problem solved!
Not that easy… this is Linux, remember? A dev with a bug fix doesn’t hand you a new binary and send you on your way. I had to go to the Samba svn, checkout from the 3023 branch and rebuild the package from source, which involved reverse engineering the appropriate configuration options for the install by trial and error. For my reference and that of anyone else who might be tempted to do the same, here’s are the magic incantations I used to get the source branch and build and install it to the right places for my FC4 distro. I make no guarantees that I haven’t done something I shouldn’t, but it’s working okay for me:
$ svn co svn://svnanon.samba.org/samba/branches/SAMBA_3_0_23 /path/to/samba $ cd /path/to/samba/source $ ./autogen.sh $ ./configure –prefix=/usr –with-configdir=/etc/samba –with-privatedir=/etc/samba –with-automount –with-pam –with-acl-support $ make $ make install
Once you’ve done this, run testparm and smbstatus to make sure you’re picking up the right smb.conf and have the expected version number (as of the time of this post, it should be 3.0.23b).
Update: A couple of people have pointed out that it would be better to just get the revision that contains the fix, which should just mean adding -r17259 to the svn checkout command above, or even just a patch with the fix. I’m not about to revert my working install to try doing this, and I have no idea how to produce a patched rpm anyway, but if you’d rather try one of the other options then Jeremy Allison posted the revision number and patch here.
Once again, Linux isn’t for your average grandma (It occurs to me that if I keep using that as my example naive user, I’m eventually going to find myself under fire from some as-yet-unseen group of Linux expert grandmothers. Scary thought.).
Anyway, it’s built and installed and it seems to have fixed everything including the unicode filenames issue with Amarok. So, +1 to Amarok, -1 to buggy package releases and +1 to Jeremy for having already found and fixed the problem. I don’t know how long it will take for the fix (3.0.23b, I’m told) to hit the package repositories, but if you’re seeing the symptoms I saw and find your way here then at least you’ll know what’s what even if building from source isn’t something that appeals.


whew Thank you very much for this entry. I spent probably seven hours yesterday screaming at FC5 (the client machine) because my SMB mounts against my FC4 server would no longer work.
I guess I’ll just have to chomp at the bit while I wait for the appropriate FC4 server package to get distributed…
(chomp chomp)
September 11th, 2006 at 4:39 pmThanks – I just spent a whole weekend tearing my hair out because I couldn’t play mp3s from a samba share .. then thanks to your post I went looking for a samba update and found 3.0.23c on http://fedoranews.org/cms/node/1646 – now everything’s back working again.
I never had this trouble with smbfs and I’m really not impressed that it just disappeared and I had no choice but to use cifs which didn’t work.
October 9th, 2006 at 10:38 pm