[Pkg-xfce-devel] Bug#781174: thunar: unable to mount password protected shares (jessie)

Janis Hamme lists.oss at hamme.info
Wed Mar 25 16:52:13 UTC 2015

Package: thunar
Version: 1.6.3-2
Severity: normal

Dear Maintainer,

I have some password protected shares in my /etc/fstab that are mounted
by unprivileged users, e. g.

> // /media/Data cifs vers=3.0,users,username=user,noauto,file_mode=0640,dir_mode=0750 0 0

When mounting the share with the 'mount' command a password is prompted
as intended. However, mounting the share with thunar fails: On the first
access thunar tries to mount the share and a graphical password prompt
*should* appear. Instead an error message is shown:

> Failed to create password file: Permission denied

After some investigation I found out that the ask-password functionality
from systemd is used. Therefore a file has to be created in
/run/systemd/ask-password and password agents watching the directory
might prompt for the password. See [1] for reference.

Creating the password file fails, as /run/systemd/ask-password is only
writable by root. As this functionality is intended to be used for
system-level passwords only, I guess it shouldn't be world writable.

To mount the volume, thunar seems to rely on libglib2 (Thunar calls
g_volume_mount). See [2], [3] for the source code. I don't really
understand how that code works and why systemd ask-password is used - I
didn't manage to find the corresponding code.

Im not sure if this bug can be fixed in thunar or if either systemd or
glib2 are to blame, but I hope you can help to track down the root
cause. Probably systemd shouldn't be used at all for mounting shares in

To reproduce this bug you don't need an actual share - you can add a
fake entry to your fstab.


[1] http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents/
[3] https://git.gnome.org/browse/glib/tree/gio/gvolume.c?h=glib-2-42

-- System Information:
Debian Release: 8.0
  APT prefers testing-updates
  APT policy: (990, 'testing-updates'), (990, 'testing'), (50, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4+custom-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages thunar depends on:
ii  desktop-file-utils  0.22-1
ii  exo-utils           0.10.2-4
ii  libatk1.0-0         2.14.0-1
ii  libc6               2.19-15
ii  libcairo2           1.14.0-2.1
ii  libdbus-1-3         1.8.16-1
ii  libdbus-glib-1-2    0.102-1
ii  libexo-1-0          0.10.2-4
ii  libgdk-pixbuf2.0-0  2.31.1-2+b1
ii  libglib2.0-0        2.42.1-1
ii  libgtk2.0-0         2.24.25-3
ii  libgudev-1.0-0      215-12
ii  libice6             2:1.0.9-1+b1
ii  libnotify4          0.7.6-2
ii  libpango-1.0-0      1.36.8-3
ii  libsm6              2:1.2.2-1+b1
ii  libthunarx-2-0      1.6.3-2
ii  libxfce4ui-1-0      4.10.0-6
ii  libxfce4util6       4.10.1-2
ii  libxfconf-0-2       4.10.0-3
ii  shared-mime-info    1.3-1
ii  thunar-data         1.6.3-2

Versions of packages thunar recommends:
ii  dbus-x11             1.8.16-1
ii  gvfs                 1.22.2-1
ii  libfontconfig1       2.11.0-6.3
ii  libfreetype6         2.5.2-3
ii  libpangocairo-1.0-0  1.36.8-3
ii  libpangoft2-1.0-0    1.36.8-3
ii  thunar-volman        0.8.0-4
ii  tumbler              0.1.30-1+b1
ii  xdg-user-dirs        0.15-2
ii  xfce4-panel          4.10.1-1

Versions of packages thunar suggests:
ii  thunar-archive-plugin     0.3.1-3
ii  thunar-media-tags-plugin  0.2.1-1

-- no debconf information

More information about the Pkg-xfce-devel mailing list