[Pkg-utopia-maintainers] Bug#492641: hal: Mounting SATA partitions fails with insufficient privileges

Darshaka Pathirana dpat at syn-net.org
Mon Jan 19 18:56:21 UTC 2009


On 14/08/2008 20:59, Michael Biebl wrote:
> Bernd Böckmann wrote:
>> Package: hal
>> Version: 0.5.11-2
>> Severity: important
>>
>> I can not mount SATA partitions of any filesystem type by using
>> gnome-mount or 
> 
> Is that a local partition or a partition on a removable device?
> Mounting local partitions is forbidden (deliberately) due to security
> reasons, even if the user is in group plugdev.

Argl! After trying to mount a local (ntfs) partition without success I
finally found this one.

Could you pleaseprovide a pointer to some documentation? Any way to come
around this limitation?

JFTR:

At first I got "Invalid mount option when attempting to mount the volume 'data'
by using nautilus which itself uses gnome-mount and therefor trying to debug
with:

% gnome-mount -vntd /dev/sdc1

gnome-mount 0.7
** (gnome-mount:23972): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_0AA04FACA04F9CD7
** (gnome-mount:23972): DEBUG: read default option 'locale=' from gconf strlist key /system/storage/default_options/ntfs-3g/mount_options
** (gnome-mount:23972): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_0AA04FACA04F9CD7 with mount_point='data', fstype='ntfs-3g', num_options=1
** (gnome-mount:23972): DEBUG:   option='locale=en_US.UTF-8'

** (gnome-mount:23972): WARNING **: Mount failed for /org/freedesktop/Hal/devices/volume_uuid_0AA04FACA04F9CD7
org.freedesktop.Hal.Device.Volume.InvalidMountOption : The option 'locale=en_US.UTF-8' is not allowed for uid=1000

After removing "locale=" from the ntfs-3g mount-options (see below) by issuing (is this is a ntfs-3g or hal bug?):

% gconf-editor /system/storage/default_options/ntfs-3g

and retrying the gnome-mount I then got this: 

gnome-mount 0.7
** (gnome-mount:24003): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_0AA04FACA04F9CD7
** (gnome-mount:24003): DEBUG: Mounting /org/freedesktop/Hal/devices/volume_uuid_0AA04FACA04F9CD7 with mount_point='data', fstype='ntfs-3g', num_options=0

** (gnome-mount:24003): WARNING **: Mount failed for /org/freedesktop/Hal/devices/volume_uuid_0AA04FACA04F9CD7
org.freedesktop.Hal.Device.Volume.PermissionDenied : Refusing to mount device /dev/sdc1 for uid=1000.

(where nautlius gave me "You are not privileged to mount the volume 'data'")

Here the initial gconf-settings for ntfs and ntfs-3g:

% gconftool --dump  /system/storage/default_options/ntfs

<gconfentryfile>
  <entrylist base="/system/storage/default_options/ntfs">
    <entry>
      <key>fstype_override</key>
      <schema_key>/schemas/system/storage/default_options/ntfs/fstype_override</schema_key>
      <value>
        <string>ntfs-3g</string>
      </value>
    </entry>
    <entry>
      <key>mount_options</key>
      <schema_key>/schemas/system/storage/default_options/ntfs/mount_options</schema_key>
      <value>
        <list type="string">
            <value>
              <string>umask=222</string>
            </value>
        </list>
      </value>
    </entry>
  </entrylist>
</gconfentryfile>

and
% gconftool --dump  /system/storage/default_options/ntfs-3g

<gconfentryfile>
  <entrylist base="/system/storage/default_options/ntfs-3g">
    <entry>
      <key>mount_options</key>
      <schema_key>/schemas/system/storage/default_options/ntfs-3g/mount_options</schema_key>
      <value>
        <list type="string">
            <value>
              <string>locale=</string>
            </value>
        </list>
      </value>
    </entry>
  </entrylist>
</gconfentryfile>

*My* workaround:

* removed "locale=" from "/system/storage/default_options/ntfs-3g/mount-options"

% chown root:root /usr/bin/ntfs-3g
% chmod 4755 /usr/bin/ntfs-3g

and added the following line to /etc/fstab:

/dev/sdc1       /media/data01   ntfs-3g user,noauto     0       2

Ok. Nice. But is there nonice way to mount the internal partitions without touching the fstab-file?

Thanks for any help.

Greetings && HAND,
 - Darsha






More information about the Pkg-utopia-maintainers mailing list