Credential problem with HAL and USB disk.
#1
Hello there

My USB drives are mounted correctly under xbmc. I can see them and browse & play content.

Xbmc is running as xbmc user ( non root ).
And here is my problem. External drives are mounted read only for the xbmc users. I can see the disk is mounted as root:root in /media.

I'd like those disk to be writable for xbmc user, if I want to use the File Manager of xbmc to copy & paste media from xbmc to the external drive.

I'm completly messed with HAL, tryed many things without success.

My Policykit.conf have this:

<config version="0.1">
<define_admin_auth user="xbmc"/>
</config>


Here is the xbmc log part when usb disk is mounted:

Code:
19:19:57 T:3029833600 M:1314873344   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_2008_2018_2007111209575097) Added
19:19:57 T:3029833600 M:1314873344   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_1d6b_2_0000_00_06_1_usbraw_0) Added
19:19:57 T:3029833600 M:1314873344   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_2008_2018_2007111209575097_if0) Added
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_2008_2018_2007111209575097_if0_scsi_generic) Added
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_2008_2018_2007111209575097_if0_scsi_host) Added
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/usb_device_2008_2018_2007111209575097_if0_scsi_host_scsi_device_lun0) Added
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/storage_serial_USB_2_0_Flash_Disk_2007111209575097_0_0) Added
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/storage_serial_USB_2_0_Flash_Disk_2007111209575097_0_0) Property info.interfaces modified
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/volume_uuid_A8D4_E2E0) Added
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Added - removable disk | UUID A8D4-E2E0 | FileSystem vfat | Mounted on /media/BOOTUSB/ | HotPlugged YES | Type 0 |Approved YES
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/volume_uuid_A8D4_E2E0) Property volume.mount_point modified
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Update - removable disk | UUID A8D4-E2E0 | FileSystem vfat | Mounted on /media/BOOTUSB/ | HotPlugged YES | Type 0 |Approved YES
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Device (/org/freedesktop/Hal/devices/volume_uuid_A8D4_E2E0) Property volume.is_mounted modified
19:20:02 T:3029833600 M:1303785472   DEBUG: HAL: Update - removable disk | UUID A8D4-E2E0 | FileSystem vfat | Mounted on /media/BOOTUSB/ | HotPlugged YES | Type 0 |Approved YES


xbmc svn 25851 , 32 bits, debian testing.

Some lightened spirits with HAL here ?

Thanks Smile
Reply
#2
Try this as /etc/PolicyKit/PolicyKit.conf
Code:
<config version="0.1">

<match action="org.freedesktop.hal.storage.mount-removable">
    <return result="yes"/>
</match>

<match action="org.freedesktop.hal.storage.mount-fixed">
    <return result="yes"/>
</match>

</config>
Reply
#3
That made the trick. Thanks a lot.
Reply
#4
I'm going to assume this was in Live RC1. The problem should be resolved in the next live release.
Reply
#5
My mistake, it didn't solved it.

I was logued in root while testing... Still can't write on it from xbmc user.

I'm not on live, but Debian Squeeze here.

It's mounted as root:root user, with drwxrwxr-x permissions.

16 drwxrwxr-x 4 root root 16384 déc. 22 09:16 BOOTUSB

cat /proc/mounts | grep vfat gives:
Quote:/dev/sdd1 /media/BOOTUSB vfat rw,nosuid,nodev,relatime,fmask=0002,dmask=0002,allow_utime=0020,codepage=cp437,iocharset=utf8 0 0

Perhaps by changing the 0002 dmask of halevt-mount ? What should be optimal for RW to all users ?
Reply
#6
Ok found the trick.

In /etc/halevt/halevt.xml

replacing umask here ( -m 022 by 0 ):

Code:
<halevt:Insertion exec="halevt-mount -u $hal.udi$ -m 0"/>

I've removed -o sync too, to solve slow transfer usb speed on usb key.
Reply

Logout Mark Read Team Forum Stats Members Help
Credential problem with HAL and USB disk.0