Archiv verlassen und diese Seite im Standarddesign anzeigen : NTFS und HAL mit User rechten
detonation997
12.12.07, 00:11
Hallo,
ich wollte heute unter Debian lenny eine ntfs-Partition via HAL mounten und bin kläglich gescheitert, als "normaler" Benutzer (uid=1000,gid=100) darauf zuzugreifen (Permission Denied). Die Konfiguration unter
/usr/share/hal/fdi/policy/10osvendor/20-storage-methods.fdi ist für ntfs und vfat Partitionen ident:
...
<!-- allow these mount options for vfat -->
<match key="volume.fstype" string="vfat">
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
<append key="volume.mount.valid_options" type="strlist">utf8</append>
<append key="volume.mount.valid_options" type="strlist">shortname=</append>
<append key="volume.mount.valid_options" type="strlist">codepage=</append>
<append key="volume.mount.valid_options" type="strlist">iocharset=</append>
<append key="volume.mount.valid_options" type="strlist">umask=</append>
<append key="volume.mount.valid_options" type="strlist">dmask=</append>
<append key="volume.mount.valid_options" type="strlist">fmask=</append>
<append key="volume.mount.valid_options" type="strlist">uid=</append>
<append key="volume.mount.valid_options" type="strlist">flush</append>
</match>
</match>
...
<!-- allow these mount options for ntfs -->
<match key="volume.fstype" string="ntfs">
<match key="/org/freedesktop/Hal/devices/computer:system.kernel.name" string="Linux">
<append key="volume.mount.valid_options" type="strlist">uid=</append>
<append key="volume.mount.valid_options" type="strlist">gid=</append>
<append key="volume.mount.valid_options" type="strlist">umask=</append>
<append key="volume.mount.valid_options" type="strlist">locale=</append>
<append key="volume.mount.valid_options" type="strlist">utf8</append>
</match>
</match>
...
Weiß jemand, woran's liegen könnte? Bei vfat funktionierts einwandfrei, da wird auch als mount-option "uid=1000" übergeben. In der /etc/fstab möcht ich eigentlich auch nix rumhacken. Ich bin mir sicher, dass sich das Problem mit der HAL-Konfiguration lösen lässt :)
Danke schon im Voraus,
Rainer
detonation997
12.12.07, 00:44
Hallo,
ich häng wohl besser ein bisschen debugging-info an:
Erzeugt mit folgenden Kommandos:
phylos:~# hald --version [0:55:30 @ 07-12-12]
HAL package version: 0.5.10
phylos:~# hald --verbose=yes --daemon=no
Ergibt sich folgende Ausgabe:
Run started hal-storage-mount (0) (1)
! full path is '/usr/lib/hal/hal-storage-mount', program_dir is '/usr/lib/hal'
23464: XYA attempting to get lock on /media/.hal-mtab-lock
23464: XYA got lock on /media/.hal-mtab-lock
00:42:52.423 [I] hald_dbus.c:5243: ***************************
00:42:52.423 [I] hald_dbus.c:5244: ********* got a connection 6c6060
00:42:52.423 [I] hald_dbus.c:5245: ***************************
device = /dev/sde1
invoked by uid = 1000
invoked by system bus connection = :1.53
label '' uuid '4680-38FF'
Looking at /etc/fstab entry '/dev/sda8'
/etc/fstab: device /dev/sda8 -> /dev/sda8
Looking at /etc/fstab entry '/dev/sda9'
/etc/fstab: device /dev/sda9 -> /dev/sda9
Looking at /etc/fstab entry '/dev/sda10'
/etc/fstab: device /dev/sda10 -> /dev/sda10
Looking at /etc/fstab entry '/dev/sda7'
/etc/fstab: device /dev/sda7 -> /dev/sda7
Looking at /etc/fstab entry '/dev/sda1'
/etc/fstab: device /dev/sda1 -> /dev/sda1
Looking at /etc/fstab entry '/dev/sda5'
/etc/fstab: device /dev/sda5 -> /dev/sda5
Looking at /etc/fstab entry '/dev/cdrom0'
/etc/fstab: device /dev/cdrom0 -> /dev/cdrom0
Looking at /etc/fstab entry '/dev/fd0'
/etc/fstab: device /dev/fd0 -> /dev/fd0
Looking at /etc/fstab entry 'none'
/etc/fstab: device none -> none
Looking at /etc/fstab entry '/home'
/etc/fstab: device /home -> /home
Looking at /etc/fstab entry '/tmp'
/etc/fstab: device /tmp -> /tmp
Looking at /etc/fstab entry '/dev'
/etc/fstab: device /dev -> /dev
Looking at /etc/fstab entry '/dev/pts'
/etc/fstab: device /dev/pts -> /dev/pts
Looking at /etc/fstab entry '/proc'
/etc/fstab: device /proc -> /proc
Looking at /etc/fstab entry '/root'
/etc/fstab: device /root -> /root
mount_point = ''
mount_fstype = ''
mount_options = 'shortname=winnt uid=1000 '
trying dir /media/disk
given_options[0] = 'shortname=winnt'
given_options[1] = 'uid=1000'
allowed_options[0] = 'ro'
allowed_options[1] = 'sync'
allowed_options[2] = 'dirsync'
allowed_options[3] = 'noatime'
allowed_options[4] = 'nodiratime'
allowed_options[5] = 'noexec'
allowed_options[6] = 'quiet'
allowed_options[7] = 'remount'
allowed_options[8] = 'exec'
allowed_options[9] = 'utf8'
allowed_options[10] = 'shortname='
allowed_options[11] = 'codepage='
allowed_options[12] = 'iocharset='
allowed_options[13] = 'umask='
allowed_options[14] = 'dmask='
allowed_options[15] = 'fmask='
allowed_options[16] = 'uid='
allowed_options[17] = 'flush'
uid= with uid 1000
using action org.freedesktop.hal.storage.mount-removable for uid 1000, system_bus_connection :1.53
passed privilege
23464: XYA creating /media/.hal-mtab~
23464: XYA closing /media/.hal-mtab~
00:42:52.435 [I] osspec.c:273: /proc/mounts tells, that the mount has tree changed
23464: XYA done renaming /media/.hal-mtab~ to /media/.hal-mtab
23464: XYA released lock on /media/.hal-mtab-lock
00:42:52.436 [I] hald_dbus.c:5186: ************************
/usr/lib/hal/hal-storage-mount exited
00:42:52.436 [I] hald_dbus.c:5187: Client to local_server was disconnected for 6c6060
00:42:52.436 [I] hald_dbus.c:5188: ************************
00:42:52.436 [I] hald_dbus.c:5229: ***************************
00:42:52.436 [I] hald_dbus.c:5230: ********* unregistered 6c6060
00:42:52.436 [I] hald_dbus.c:5231: ***************************
00:42:52.436 [I] hald_dbus.c:3962: No more methods in queue
00:42:52.436 [I] device.c:1845: Removing locks from ':1.54'
00:42:52.438 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.53
00:42:52.438 [I] device.c:1845: Removing locks from ':1.53'
00:42:54.823 [I] hald_dbus.c:5037: OK for method 'Mount' with signature 'ssas' on interface 'org.freedesktop.Hal.Device.Volume' for UDI '/org/freedesktop/Hal/devices/volume_uuid_706421D064219A3C' and execpath 'hal-storage-mount'
00:42:54.823 [I] hald_dbus.c:3938: no need to enqueue
Run started hal-storage-mount (0) (1)
! full path is '/usr/lib/hal/hal-storage-mount', program_dir is '/usr/lib/hal'
23467: XYA attempting to get lock on /media/.hal-mtab-lock
23467: XYA got lock on /media/.hal-mtab-lock
00:42:54.824 [I] hald_dbus.c:5243: ***************************
00:42:54.824 [I] hald_dbus.c:5244: ********* got a connection 6fe030
00:42:54.824 [I] hald_dbus.c:5245: ***************************
device = /dev/sdb1
invoked by uid = 1000
invoked by system bus connection = :1.55
label '400G_RPO' uuid '706421D064219A3C'
Looking at /etc/fstab entry '/dev/sda8'
/etc/fstab: device /dev/sda8 -> /dev/sda8
Looking at /etc/fstab entry '/dev/sda9'
/etc/fstab: device /dev/sda9 -> /dev/sda9
Looking at /etc/fstab entry '/dev/sda10'
/etc/fstab: device /dev/sda10 -> /dev/sda10
Looking at /etc/fstab entry '/dev/sda7'
/etc/fstab: device /dev/sda7 -> /dev/sda7
Looking at /etc/fstab entry '/dev/sda1'
/etc/fstab: device /dev/sda1 -> /dev/sda1
Looking at /etc/fstab entry '/dev/sda5'
/etc/fstab: device /dev/sda5 -> /dev/sda5
Looking at /etc/fstab entry '/dev/cdrom0'
/etc/fstab: device /dev/cdrom0 -> /dev/cdrom0
Looking at /etc/fstab entry '/dev/fd0'
/etc/fstab: device /dev/fd0 -> /dev/fd0
Looking at /etc/fstab entry 'none'
/etc/fstab: device none -> none
Looking at /etc/fstab entry '/home'
/etc/fstab: device /home -> /home
Looking at /etc/fstab entry '/tmp'
/etc/fstab: device /tmp -> /tmp
Looking at /etc/fstab entry '/dev'
/etc/fstab: device /dev -> /dev
Looking at /etc/fstab entry '/dev/pts'
/etc/fstab: device /dev/pts -> /dev/pts
Looking at /etc/fstab entry '/proc'
/etc/fstab: device /proc -> /proc
Looking at /etc/fstab entry '/root'
/etc/fstab: device /root -> /root
mount_point = '400G_RPO'
mount_fstype = ''
mount_options = ''
trying dir /media/400G_RPO
allowed_options[0] = 'ro'
allowed_options[1] = 'sync'
allowed_options[2] = 'dirsync'
allowed_options[3] = 'noatime'
allowed_options[4] = 'nodiratime'
allowed_options[5] = 'noexec'
allowed_options[6] = 'quiet'
allowed_options[7] = 'remount'
allowed_options[8] = 'exec'
allowed_options[9] = 'uid='
allowed_options[10] = 'gid='
allowed_options[11] = 'umask='
allowed_options[12] = 'locale='
allowed_options[13] = 'utf8'
using action org.freedesktop.hal.storage.mount-removable for uid 1000, system_bus_connection :1.55
passed privilege
23467: XYA creating /media/.hal-mtab~
23467: XYA closing /media/.hal-mtab~
00:42:54.884 [I] osspec.c:273: /proc/mounts tells, that the mount has tree changed
23467: XYA done renaming /media/.hal-mtab~ to /media/.hal-mtab
23467: XYA released lock on /media/.hal-mtab-lock
/usr/lib/hal/hal-storage-mount exited
00:42:54.884 [I] hald_dbus.c:5186: ************************
00:42:54.884 [I] hald_dbus.c:5187: Client to local_server was disconnected for 6fe030
00:42:54.884 [I] hald_dbus.c:5188: ************************
00:42:54.884 [I] hald_dbus.c:5229: ***************************
00:42:54.884 [I] hald_dbus.c:5230: ********* unregistered 6fe030
00:42:54.884 [I] hald_dbus.c:5231: ***************************
00:42:54.885 [I] device.c:1845: Removing locks from ':1.56'
00:42:54.885 [I] hald_dbus.c:3962: No more methods in queue
00:42:54.886 [I] ci-tracker.c:212: Removing CICallerInfo object for :1.55
00:42:54.886 [I] device.c:1845: Removing locks from ':1.55'
Zuerst wurde hier die vfat Partition gemountet. Da sieht man auch gleich, dass die uid=1000 Option richtig an das Mount-Kommando übergeben wurde. Beim ntfs-mount fehlt das leider.
Danke fürs Lesen!
Rainer
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.