utf-8 characters cause permission denied error

Bug #525435 reported by StuartYeates
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba
Confirmed
Medium
samba (Ubuntu)
Triaged
Medium
Unassigned

Bug Description

Binary package hint: samba

Accessing a remote windows server using the standard gnome GUI connection tool works for the share as a whole. Accessing a file including a macron in the name (a directory called "Māori") gives a permission denied error ("You do not have the permissions necessary to view the contents of "Māori".").

The share doesn't normally require a username and password to access. Everything works fine from windows.

I asked aobut this on irc and was told to report it as a bug.

cheers
stuart

ProblemType: Bug
Architecture: i386
Date: Mon Feb 22 08:09:56 2010
DistroRelease: Ubuntu 9.10
Package: libsmbclient 2:3.4.0-3ubuntu5.4
ProcEnviron:
 LANG=en_NZ.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-17.54-generic-pae
SourcePackage: samba
Uname: Linux 2.6.31-17-generic-pae i686

Revision history for this message
StuartYeates (stuart-yeates) wrote :
Revision history for this message
Anzenketh (anzenketh) wrote :

Could you please attach your smb.conf file

tags: added: samba unicode
Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
StuartYeates (stuart-yeates) wrote :
Revision history for this message
Thierry Carrez (ttx) wrote :

Could you check if you manage to access the file with smbclient ? That will allow us to tell if the problem is in samba or gnome.

Revision history for this message
StuartYeates (stuart-yeates) wrote :

smbclient fails.

There is also an interesting feature where the columns of the directory listing are out by one for this column. This leads me to suspect that the problem may be in unicode normalisation. There are two ways of representing ā in Unicode, a single character and an 'a' followed by a compose character. Every sane person uses the single character, but alas one of the standards in use in my organisation (MARC) uses the compose character.

smb: \> ls M*
  ...
  Master Subject Guides 2008 D 0 Thu Feb 18 12:51:52 2010
  Master Subject Guides 2009 D 0 Sun Feb 21 13:38:19 2010
  Māori D 0 Mon Nov 23 16:47:39 2009

  59153 blocks of size 2097152. 6128 blocks available
smb: \> cd Māori
smb: \Māori\> ls
NT_STATUS_ACCESS_DENIED listing \Māori\*

  59153 blocks of size 2097152. 6128 blocks available

Revision history for this message
StuartYeates (stuart-yeates) wrote :

One other detail that may be relevant:
$ env | grep LANG
LANG=en_NZ.UTF-8
GDM_LANG=en_NZ.UTF-8

Revision history for this message
Ian Beardslee (ibeardslee) wrote :

Karmic with standard smb/samba packages installed
LANG=en_NZ.UTF-8
Māori Keyboard layout

Connecting to the Linux Samba server. A File created via a share mounted via smbmount ...

Using Nautilus to connect to a samba share:
$ nautilus smb://samba/share
M─üori.test.txt

Using Nautilus to open the same shared mounted using smbmount
$ nautilus //home/user/general
Māori.test.txt

Connecting to the Linux Samba server. A Directory created via a samba share via nautilus

Using Nautilus to connect to a samba share:
$ nautilus smb://samba/share
Māori2

Using Nautilus to open the same shared mounted using smbmount
$ nautilus //home/user/general
M?ori2

The Directory is not visible through Nautilus, but visible via a terminal. But can't cd to M?ori2

smbmount //samba/share /home/user/general -o uid=ian,gid=users,user,credentials=/home/user/.samba_credentials,dir_mode=0775,filemode=0775,nounix

I've attached the /etc/smb.conf file.

Revision history for this message
Ian Beardslee (ibeardslee) wrote :

gah .. that should have been "I've attached the /etc/samba/smb.conf

Also my language settings ..
$ env | grep LANG
LANG=en_NZ.UTF-8
GDM_LANG=en_NZ.UTF-8
LANGUAGE=en_NZ.UTF-8

Thierry Carrez (ttx)
Changed in samba (Ubuntu):
importance: Undecided → Medium
status: Incomplete → Confirmed
Revision history for this message
Chuck Short (zulcss) wrote :

Can you try mounting the directory with iocharset=utf8?

Thanks
chuck

Revision history for this message
StuartYeates (stuart-yeates) wrote :

# sudo smbclient --socket-options=iocharset=utf8 //kete/everyone
Enter root's password:
Domain=[LIBR] OS=[Windows Server 2003 R2 3790 Service Pack 2] Server=[Windows Server 2003 R2 5.2]
smb: \> ls M*
  Mail_Services D 0 Tue Jul 14 12:24:07 2009
  MaoriServicesReview D 0 Thu Jan 14 15:00:32 2010
  Maria D 0 Fri Dec 18 13:32:21 2009
  Master Subject Guides 2008 D 0 Thu Feb 18 12:51:52 2010
  Master Subject Guides 2009 D 0 Wed Feb 24 13:33:09 2010
  Māori D 0 Mon Nov 23 16:47:39 2009

  59153 blocks of size 2097152. 5728 blocks available
smb: \> cd Māori
smb: \Māori\> ls
NT_STATUS_ACCESS_DENIED listing \Māori\*

  59153 blocks of size 2097152. 5728 blocks available

Revision history for this message
Chuck Short (zulcss) wrote :

Can you run smbclient with -d 9 please and attach the output.

Thanks
chuck

Changed in samba (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
StuartYeates (stuart-yeates) wrote :

As requested, here's a log attempting to connect with -d 9 set

Changed in samba:
status: Unknown → Confirmed
Revision history for this message
Jeremy Allison (jra-samba) wrote :

Actually, what we need is a debug level 10 from smbclient (9 isn't good enough) and a wireshark trace of the smbclient connection to the Windows server.

Attach them to the samba bug:

https://bugzilla.samba.org/show_bug.cgi?id=7241

Jeremy.

Changed in samba:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.