NTFS automount with user access is possible - it just takes some modification of HAL
First - we need a policy added to HAL like this
Created file
/usr/share/hal/fdi/policy/10osvendor/95-ntfs-permissions.fdi:
--------------------------------------------------------------------------------------------------------
Code:
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- -*- SGML -*- -->
<deviceinfo version="0.2">
<!-- Mount external ntfs drives with user privileges -->
<device>
<match key="block.is_volume" bool="true">
<match key="volume.fsusage" string="filesystem">
<match key="@block.storage_device:storage.no_partitions_hint" bool="false">
<match key="volume.partition.msdos_part_table_type" exists="true">
<match key="volume.partition.msdos_part_table_type" int="0x07">
<merge key="volume.mount_option" type="string">umask=0222</merge>
</match>
</match>
</match>
</match>
</match>
</device>
</deviceinfo>
--------------------------------------------------------------------------------------------------------
restart the hal daemon (
service haldaemon restart)
This creates a new HAL attribute for your NTFS volumes on plugin containing the appropriate umask.
now edit /usr/share/hal/scripts/hal-system-storage-mount
Just after all the MOUNTOPTIONS processing (after the fi,before the commented echo )
add the following line
Code:
fi
MOUNTOPTIONS="$MOUNTOPTIONS,$HAL_PROP_VOLUME_MOUNT_OPTION"
# echo "options = '$MOUNTOPTIONS'"
Test. It works for me.
hal-system-storage-mount is invoked when a new device is detected, after policy processing. You can add additional policies that modify the hal properties set for the device.
hal-system-storage-mount gets some details from hal properties and also tries to read mount info from /etc/fstab based on the device. fstab provides the canonical mount options and mount point, and hal-system-storage-mount does not get any generic mount options from hal properties. This works ok for VFAT but fails for NTFS, and fstab entries may not work well in situations where hotplugging occurs (the first device plugged in is /dev/sda, but may be different from the last /dev/sda). This modification works for all ntfs volumes without fstab changes.
hope this helps
Simon