diff --git a/src/calibre/devices/udisks.py b/src/calibre/devices/udisks.py index 105326519a..9cb9b2adc5 100644 --- a/src/calibre/devices/udisks.py +++ b/src/calibre/devices/udisks.py @@ -5,7 +5,7 @@ __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal ' __docformat__ = 'restructuredtext en' -import dbus +import os, dbus def node_mountpoint(node): @@ -37,7 +37,7 @@ class UDisks(object): try: return unicode(d.FilesystemMount('', ['auth_no_user_interaction', 'rw', 'noexec', 'nosuid', - 'sync', 'nodev', 'uid=1000', 'gid=1000'])) + 'sync', 'nodev', 'uid=%d'%os.geteuid(), 'gid=%d'%os.getegid()])) except: # May be already mounted, check mp = node_mountpoint(str(device_node_path))