Owner/umask at automount
Axel
axel.azerty at laposte.net
Mon Dec 12 14:46:01 PST 2005
Hello
I m using fedora Core 4 and trying to automounts a NTFS partition
(plugged by USB)
Since the NTFS driver mount automatically partitions owned by root, with
a 0077 umask, I must defined options "umask" as "0022" and "uid" as
"axel" when using the "mount" command, and this works well. So I just
wanted this to be done automatically by HAL.
On plug, the disk mounts and a new link appears on my gnome desktop.
The problem is that the mounted partition belongs to root:root and no to
the current user, like my USB flash key.
I tryied to add some lines in the file
"/usr/share/hal/fdi/policy/10osvendor10-storage-policy.fdi"
I modified this lines as :
<!-- HPFS/NTFS -->
<match key="volume.partition.msdos_part_table_type" int="0x07">
<merge key="volume.policy.should_mount"
type="bool">true</merge>
<!-- the line I added -->
<merge key="volume.policy.mount_option.umask"
type="string">0222</merge>
</match>
And, when I plug the USB disk, it s always owned by root, with
"drwx------ " permissions, though lshal displays the new parameters I
just added :
udi = '/org/freedesktop/Hal/devices/volume_uuid_64E448C3E44898E6'
volume.policy.mount_option.fscontext=system_u:object_r:removable_t =
true (bool)
info.callouts.remove = {'fstab-sync'} (string list)
info.callouts.add = {'hald-add-selinux-mount-option', 'fstab-sync'}
(string list)
volume.policy.mount_option.uid = 'axel' (string)
volume.policy.mount_option.umask = '0222' (string)
volume.policy.desired_mount_point = 'Disque local' (string)
volume.policy.mount_filesystem = 'ntfs' (string)
volume.policy.should_mount = true (bool)
info.udi =
'/org/freedesktop/Hal/devices/volume_uuid_64E448C3E44898E6' (string)
volume.partition.msdos_part_table_type = 7 (0x7) (int)
info.product = 'Disque local' (string)
volume.size = 164694749184 (0x2658927000) (uint64)
volume.num_blocks = 321669432 (0x132c4938) (int)
volume.block_size = 512 (0x200) (int)
volume.partition.number = 1 (0x1) (int)
info.capabilities = {'volume', 'block'} (string list)
info.category = 'volume' (string)
volume.is_partition = true (bool)
volume.is_disc = false (bool)
volume.is_mounted = false (bool)
volume.mount_point = '' (string)
volume.label = 'Disque local' (string)
volume.uuid = '64E448C3E44898E6' (string)
volume.fsversion = '3.1' (string)
volume.fsusage = 'filesystem' (string)
volume.fstype = 'ntfs' (string)
block.storage_device =
'/org/freedesktop/Hal/devices/storage_model_6VLAT20' (string)
block.is_volume = true (bool)
block.minor = 17 (0x11) (int)
block.major = 8 (0x8) (int)
block.device = '/dev/sdb1' (string)
linux.hotplug_type = 3 (0x3) (int)
info.parent = '/org/freedesktop/Hal/devices/storage_model_6VLAT20'
(string)
linux.sysfs_path_device = '/sys/block/sdb/sdb1' (string)
linux.sysfs_path = '/sys/block/sdb/sdb1' (string)
So, is this a normal behaviour ? Or maybe I forgot to modify some
configurations files ?
Thanks in advance for your help.
Axel
More information about the hal
mailing list