Hard drives connected by eSATA are hotpluggable from the end-user's perspective, but HAL erroneously considers them to be fixed. This causes problems for users on distros that forbid normal users from mounting fixed drives as a security precaution (e.g., Debian, Ubuntu). Meanwhile, using the same drive as a USB device via an eSATA-to-USB adapter works correctly. Further, manually mounting the eSATA device as root works as correctly.
Steps to reproduce:
1) Obtain a computer with an eSATA port, an eSATA drive, and an eSATA-to-USB adapter.
5) Try to open the drive in Nautilus and observe the same error. Try to mount it with gnome-mount as yourself (e.g., "gnome-mount -d /dev/sdb1") and observe the same error.
6) Mount the eSATA drive manually as root (e.g., "sudo gnome-mount -d /dev/sdb1" or "sudo mount /dev/sdb1 /media/disk") and observe that it works and that the drive is accessible.
Expected behaviour:
eSATA drives should be considered to be hotpluggable, and thus the normal user account should be able to successfully mount the eSATA drive (either automatically as in step 4 or manually as in step 5). For an end user who switches from a USB connection to eSATA to get the extra speed (me), the error message is a rude awakening.
I have observed this bug on Debian Etch/Lenny 2.6.18-5 amd64 for each of the following package versions for hal and libhal-storage1:
0.5.8.1-9
0.5.9.1-2
0.5.9.1-4
For the latter two tests, hal-info was 20070618-1. For all three, libhal1 was version 0.5.9.1-2, but I'd imagine the bug is not in libhal.
Some info on my system: it is a Dell XPS M1710 laptop with a Core 2 Duo. The eSATA port actually comes from an eSATA-to-ExpressCard adapter, which requires only the pciehp kernel module (which on my system must be loaded with the option pciehp_force=1).
Thanks in advance, and good luck! I certainly hope that it does not turn out to be impossible to distinguish between eSATA drives and internal SATA drives ...
Hard drives connected by eSATA are hotpluggable from the end-user's perspective, but HAL erroneously considers them to be fixed. This causes problems for users on distros that forbid normal users from mounting fixed drives as a security precaution (e.g., Debian, Ubuntu). Meanwhile, using the same drive as a USB device via an eSATA-to-USB adapter works correctly. Further, manually mounting the eSATA device as root works as correctly.
Steps to reproduce:
1) Obtain a computer with an eSATA port, an eSATA drive, and an eSATA-to-USB adapter.
2) Setup HAL to give your user account the hal-storage- removable- mount permission but not the hal-storage- fixed-mount permission (this is hard-coded in Debian because it does not have PolicyKit yet; see http:// people. debian. org/~terpstra/ message/ 20070807. 181731. 32cacc62. en.html).
3) Plug in the drive via USB and observe that it mounts automatically.
4) Plug in the drive via eSATA and observe that it erroneously fails to mount, giving the following error message:
Cannot mount volume.
Error org.freedesktop .Hal.Device. PermissionDenie dByPolicy.
-> Details
hal- storage- fixed-mount refused uid 1000
5) Try to open the drive in Nautilus and observe the same error. Try to mount it with gnome-mount as yourself (e.g., "gnome-mount -d /dev/sdb1") and observe the same error.
6) Mount the eSATA drive manually as root (e.g., "sudo gnome-mount -d /dev/sdb1" or "sudo mount /dev/sdb1 /media/disk") and observe that it works and that the drive is accessible.
Expected behaviour:
eSATA drives should be considered to be hotpluggable, and thus the normal user account should be able to successfully mount the eSATA drive (either automatically as in step 4 or manually as in step 5). For an end user who switches from a USB connection to eSATA to get the extra speed (me), the error message is a rude awakening.
I have observed this bug on Debian Etch/Lenny 2.6.18-5 amd64 for each of the following package versions for hal and libhal-storage1:
0.5.8.1-9
0.5.9.1-2
0.5.9.1-4
For the latter two tests, hal-info was 20070618-1. For all three, libhal1 was version 0.5.9.1-2, but I'd imagine the bug is not in libhal.
Some info on my system: it is a Dell XPS M1710 laptop with a Core 2 Duo. The eSATA port actually comes from an eSATA-to- ExpressCard adapter, which requires only the pciehp kernel module (which on my system must be loaded with the option pciehp_force=1).
The output of lshal -m follows.
When inserting via USB:
$ lshal -m
Start monitoring devicelist: ------- ------- ------- ------- ------- ------- 152d_2338_ 7CA0D1820141 added 152d_2338_ 7CA0D1820141_ if0 added 152d_2338_ 7CA0D1820141_ usbraw added 152d_2338_ 7CA0D1820141_ if0_scsi_ host added 152d_2338_ 7CA0D1820141_ if0_scsi_ host_scsi_ device_ lun0 added 152d_2338_ 7CA0D1820141_ if0_scsi_ host_scsi_ device_ lun0_scsi_ generic added serial_ WDC_WD32_ WD_WCAPD1820141 _7CA0D1820141 added uuid_5dae87a8_ e207_42f2_ 85a5_812936842b da added uuid_5dae87a8_ e207_42f2_ 85a5_812936842b da property volume.mount_point = '/media/disk-1' uuid_5dae87a8_ e207_42f2_ 85a5_812936842b da property volume.is_mounted = true
-------
19:25:10.144: usb_device_
19:25:10.204: usb_device_
19:25:10.222: usb_device_
19:25:15.164: usb_device_
19:25:15.165: usb_device_
19:25:15.195: usb_device_
19:25:15.263: storage_
19:25:15.301: volume_
19:25:15.492: volume_
19:25:15.497: volume_
When inserting via eSATA:
$ lshal -m
Start monitoring devicelist: ------- ------- ------- ------- ------- ------- 2360_scsi_ host added 2360_scsi_ host_scsi_ device_ lun0 added 2360_scsi_ host_scsi_ device_ lun0_scsi_ generic added serial_ SATA_WDC_ WD3200KS_ 00_WD_WCAPD1820 141 added uuid_5dae87a8_ e207_42f2_ 85a5_812936842b da added
-------
19:28:41.331: pci_197b_
19:28:41.333: pci_197b_
19:28:41.353: pci_197b_
19:28:41.415: storage_
19:28:41.442: volume_
Viewing the lshal output for that storage ID confirms that it does not realize that the eSATA drive is hotpluggable (see indicated line):
udi = '/org/freedeskt op/Hal/ devices/ storage_ serial_ SATA_WDC_ WD3200KS_ 00_WD_WCAPD storage_ device = '/org/freedeskt op/Hal/ devices/ storage_ serial_ SATA_WDC_ W 00_WD_WCAPD1820 141' (string) op/Hal/ devices/ pci_197b_ 2360_scsi_ host_scsi_ devic op/Hal/ devices/ storage_ serial_ SATA_WDC_ WD3200KS_ 00_W hotplug_ type = 3 (0x3) (int) automount_ enabled_ hint = true (bool) drive_type = 'disk' (string) firmware_ version = '21.0' (string) hotpluggable = false (bool) <------ ------- ------- WRONG media_check_ enabled = false (bool) no_partitions_ hint = false (bool) originating_ device = '/org/freedeskt op/Hal/ devices/ pci_197b_ 2360_scsi_ device_ lun0' (string) partitioning_ scheme = 'mbr' (string) physical_ device = '/org/freedeskt op/Hal/ devices/ pci_197b_ 2360_scsi_ hos removable. media_available = true (bool) removable. media_size = 320072933376 (0x4a85d56000) (uint64) requires_ eject = false (bool) WD3200KS- 00_WD-WCAPD1820 141' (string)
1820141'
block.device = '/dev/sdb' (string)
block.is_volume = false (bool)
block.major = 8 (0x8) (int)
block.minor = 16 (0x10) (int)
block.
D3200KS_
info.capabilities = {'storage', 'block'} (string list)
info.category = 'storage' (string)
info.parent = '/org/freedeskt
e_lun0' (string)
info.product = 'WDC WD3200KS-00P' (string)
info.udi = '/org/freedeskt
D_WCAPD1820141' (string)
info.vendor = 'ATA' (string)
linux.
linux.sysfs_path = '/sys/block/sdb' (string)
storage.
storage.bus = 'scsi' (string)
storage.
storage.
storage.
storage.lun = 0 (0x0) (int)
storage.
storage.model = 'WDC WD3200KS-00P' (string)
storage.
storage.
host_scsi_
storage.
storage.
t_scsi_device_lun0' (string)
storage.removable = false (bool)
storage.
storage.
storage.
storage.serial = 'SATA_WDC_
storage.size = 320072933376 (0x4a85d56000) (uint64)
storage.vendor = 'ATA' (string)
Thanks in advance, and good luck! I certainly hope that it does not turn out to be impossible to distinguish between eSATA drives and internal SATA drives ...