https://bugzilla.novell.com/show_bug.cgi?id=293433#c11 --- Comment #11 from Bernhard Kaindl <bk@novell.com> 2007-08-12 05:10:48 MST --- Created an attachment (id=156942) --> (https://bugzilla.novell.com/attachment.cgi?id=156942) Updated HAL fdi file for ntfs-3g to allow to set all possibly useful options when using HAL I tried ntfs-config with our new hal (checked in on Friday evening, it's based on the current hal git trunk) and the HAL fdi file which ntfs-config installed (same file as used in that bug) worked flawlessy with it. URL of ntfs-config: http://flomertens.free.fr/ntfs-config/download.html To work for hot-plug, this needs a HAL back end like gnome-volume-manager (which I tested) running and polkitd from PolicyKit also needs to be running. My my first tries, it rejected my uid (0) from mounting NTFS partitions, but maybe by system wasn't fully updated to the latest rpms from STABLE yet or maybe polkitd just needed a restart after the update to latest STABLE. Policykit is described here: http://fedoraproject.org/wiki/Releases/FeaturePolicyKit http://people.freedesktop.org/~david/polkit-spec.html So PolicyKit can be used to determine which users can mount and if they can mount without password of if they have to enter the root password when asked for. So that allows for the access control which is feasible when mounting data into the system. The traditional UNIX way of doing this was to use an user group and appropriate permissions, which would allow the same access control, but not as easily configurable and flexible (e.g. users do not have log out and log in again to have their mount rights changed) ntfs-config did install that file under this path here (so not under an osvendor director, but that should not play a role, I think): /etc/hal/fdi/policy/20-ntfs-config-write-policy.fdi I'm running hald with --daemon=no --verbose=yes in an xterm and see device_info.c:1036: invalidating fdi cache each time on stdout of hald when I hit ":w" in vim to update the file. This verbose stdout also helps to understand how hal works, it's that detailed, and it tells you what frontends like "gnome-mount" do not tell you (e.g. which mount option was rejected, or if the fs was already mounted and so on) With this comment, I'm attaching an updated fdi file which allows to set all possibly useful options when using HAL. locale= shouln't even be needed in it because it overrides/modifies I also did set fstype_override in gconf's registry for ntfs ot ntfs-3g. I found this command should do the same: gconftool-2 --set --type=string /system/storage/default_options/ntfs/fstype_override ntfs-3g fstype_override The Text in the description field is:
The name of the file system driver to use by default when 'ntfs' is detected. > This is useful for configuring the system to use the 'ntfs-3g' driver for all > 'ntfs' file systems by default. User can still choose to use the 'ntfs' file system driver by overriding it per-volume or on the command line
At least with this configuration, I simply run gnome-mount -t -p 'FreeAgent Drive' ('FreeAgent Drive' is the NTFS-label of an external NTFS disk which I have) to unmount, add "-u" as the user who has the privilege "desktop-console" (which I get when I'm logged in at the system console = by default: sit before the computer) and my drive is mounted thru hal. Due to the "-t", I also get textual info back from gnome-mount about what it just did, and not only the version string. Because I did ran gconf-editor before that and went in it to /system/storage/default_options/ntfs-3g, and entered the values locale=en_US.UTF-8 force dmask=022 fmask=033 It actually mounts with these options, but it does not show me these. I can read them with: gconftool-2 --get /system/storage/default_options/ntfs-3g/mount_options [locale=en_US.UTF-8,force,dmask=022,fmask=033] And I can set per-device and per-filesystem mount settings with: gnome-mount -p 'FreeAgent Drive' --mount-options no_def_opts,force --mount-point freeagent --write-settings These mount options replace then the gconf-global ntfs-3g mount options, so it gets only mounted with no_def_opts,force in this example. BTW: no_def_opts does not cause chown/chgrp/chmod to fail on the volume, but it indeed causes that that the "allow_others" default setting is reset: l /media/* ls: cannot access /media/freeagent: Permission denied d????????? ? ? ? ? ? freeagent/ So it indeed causes that no information from the mounted volume is visible to other users. These per-device/per-volume settings can be retrived with --display-settings and reased with --erase-settings. These per-volume values are saved in a per-volume-UUID directory+file: ~/.gconf/system/storage/volumes/_org_freedesktop_Hal_devices_volume_uuid_C81C8DAE1C8D9858/%gconf.xml Seems quite useable, but what we'd still like to know is how we or an admin could set system-wide default options for mounts. Maybe it could be done in: /etc/gconf/gconf.xml.defaults after a global scheme like the ntfs scheme is created for ntfs-3g: /etc/gconf/gconf.xml.schemas/system/storage/default_options/ntfs/%gconf.xml To set default mount options like dmask=022,fmask=033 in the GNOME world would a part of the solution for bug 293429. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.