Mounting USB drives as a user...

…what do I have to do here? USB drives mount, read and write fine logged in as as root, but as a user, it’s a no-go. Even su’ing from a user acc’t does not work for me. I’ve googled the issue and there seems to be a number of fixes, which is even more confusing. It’s obviously a permissions issue, but su’ing to mount a USB drive from a user acc’t gives me a “/dev/sdb1” cannot be found in fstab or mtab, so there’s more to it perhaps.

C’mon SUSE, I don’t have any problems in Ubuntu like this. :frowning:

Thanks.

p.s. – I’m running SUSE 11.0, 64-bit. FWIW, it’s one beautiful OS.

Are you saying that you automounting is not working (as a user), or rw mounting is the problem? What file system is being used?

I’m not sure, that’s just it. It APPEARS to automount the drives, icons show up on the desktop, but an error window comes up saying the drive could not be mounted. But fstab has the usbfs as noauto. I toggled that setting in fstab to auto from noauto, to no avail. If I run fdisk -l, the usb drive appears as /dev/sbd1, but I can’t mount it even after su. But if I log out as a user and log in as root, it works great.

Is the file system ntfs or other?

It does it with both FAT and NTFS. I’m well aware of write issues on NTFS drives/partitions.

Thanks.

You don’t put usb drives in fstab. They automount in openSUSE 11 with rw permissions except for ntfs for which you need a minor system adjustment as mentioned here: Automounting external (USB) NTFS drives in read-write mode

I’ve noted that in an fstab file I’ve got on an Ubuntu installation (separate computer). Unfortunately, automounting is just not occurring on either FAT or NTFS usb drives and/or partitions. I’ve tried small thumbdrives, ide-to-usb hookups, external usb drives, and all I get logged in as a user is an icon showing up on the desktop and the message that “Failed to mount drive” followed by smaller text specifying “org.freedesktop.hal.storage.mount-removeable no ← (action, result)” with a Close button at the bottom. Again, logged in as root, it works fine.

Any ideas appreciated. Thanks.

p.s. – one more thing, this is an XFCE desktop.

swerdna wrote:

>
> You don’t put usb drives in fstab. They automount in openSUSE 11 with rw
> permissions except for ntfs for which you need a minor system adjustment
> as mentioned here: ‘Automounting external (USB) NTFS drives in
> read-write mode’ (http://www.swerdna.net.au/linhowtontfs.html#external)
>
>

Comment out the lines in fstab and try again - I had a similar problem and
that cured it fore me.


email =~ s/nospam/fudokai/

Which lines? All of them? And if it’s an fstab issue, why does everything work OK as root?

sigh

I don’t have time for this. I just need something that works.

:frowning:

Hi snakedog

Post your /etc/fstab config if you need help with this. In the case that everything is normal here, then it could be a policykit issue preventing automounting. Have a look at this file

/usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy

In particular the section referring to removable storage devices.

fstab file:

/dev/disk/by-id/scsi-SATA_SAMSUNG_HD200HJS16KJDQQ113855-part1 / ext3 acl,user_xattr 1 1
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD200HJS16KJDQQ113855-part3 swap swap defaults 0 0
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD200HJS16KJDQQ113855-part4 /home ext3 acl,user_xattr 1 2
/dev/disk/by-id/scsi-SATA_SAMSUNG_HD200HJS16KJDQQ113855-part2 /tmp ext3 acl,user_xattr 1 2
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

I had edited the usbfs line from noauto to auto, but when that had no effect, I changed the line back. The file above is the original setting.

Going to have a look at the storage policy. Thnx.

…and the contents of the storage policy file:


<?xml version=“1.0” encoding=“UTF-8”?>
<!DOCTYPE policyconfig PUBLIC
“-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN”
http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd”>

<!–
Policy definitions for HAL’s drives/media mechanims.

Copyright (c) 2007 David Zeuthen <david@fubar.dk>

HAL is licensed to you under your choice of the the Academic Free
License Version 2.1, or the GNU General Public License version 2. Some
individual source files may be under the GPL only. See COPYING for
details.

<policyconfig>

<action id=“org.freedesktop.hal.storage.mount-fixed”>
<description>Mount file systems from internal drives.</description>
<message>System policy prevents mounting internal media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep_always</allow_active>
</defaults>
</action>

<action id=“org.freedesktop.hal.storage.mount-removable”>
<description>Mount file systems from removable drives.</description>
<message>System policy prevents mounting removable media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

<action id=“org.freedesktop.hal.storage.unmount-others”>
<description>Unmount file systems mounted by other users.</description>
<message>System policy prevents unmounting media mounted by other users</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep_always</allow_active>
</defaults>
</action>

<action id=“org.freedesktop.hal.storage.eject”>
<description>Eject removable media.</description>
<message>System policy prevents ejecting removable media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

<action id=“org.freedesktop.hal.storage.crypto-setup-fixed”>
<description>Set up decryption for encrypted fixed storage devices.</description>
<message>System policy prevents accessing encrypted fixed media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep_always</allow_active>
</defaults>
</action>

<action id=“org.freedesktop.hal.storage.crypto-setup-removable”>
<description>Set up decryption for encrypted removable storage devices.</description>
<message>System policy prevents accessing encrypted removable media</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
</action>

</policyconfig>

snakedog

I had the exact same problem as you described.

I just fixed it by doing this:

In the file /usr/share/PolicyKit/policy/org.freedesktop.hal.storage.policy

In this section:

<action id=“org.freedesktop.hal.storage.mount-removable”>

Change:

  &lt;allow_inactive&gt;no&lt;/allow_inactive&gt;

To this:

  &lt;allow_inactive&gt;yes&lt;/allow_inactive&gt;

and then in a console terminal (logged in as root) execute this command:

rchal restart

to restart hal.

Why this is necessary (or even works) I have no idea.

I hope this works for you.

Nah, didn’t work. Tried a couple of different edits.
Rebooted several times. All to no avail.

Think I’m going to start another distro download. I’m
not enough of a masochist for this.

:slight_smile:

Sorry it didn’t work for you.

I understand how you feel. If I didn’t already have so many years invested in Suse (home and an hosted web server) I would switch to ubuntu myself…

Hi @ all,

i also want to mount my ext. USB HDD as user and it is not working until now.
I do the the following steps:

  1. i delete the lines that i have in the fstab for my ext. HDD
  2. i use the command: sudo ln -s /sbin/mount.ntfs-3g /sbin/mount.ntfs
  3. and i change the setting in the “org.freedesktop.hal.storage.policy” from no to yes in the section <action id=“org.freedesktop.hal.storage.mount-removable”

Now, when i connect the ext. hdd and i want to read or write in the new DOLPHIN explorer, he says: an error occoured while accessing “ext. USB HDD”, the system respond: org.freedesktop.Hal.Device.Volume.UnknownFailure: TODO: have to rethink extra options

hmm what can i do else ? Must be a problem with the rights of the user?!
Has someone a idea?
I dont want to switch to a other distri!!
Thanks

Greetings

I have it! :smiley:

I switch off the “write support” in the ntfs-config !

now it is working

Thx

Hi,
What “ntfs-config” are you referring to?
/root# l locate ntfs | grep config
finds nothing.

My problems with hal arose about one week ago with some updated file. But I can’t records from OpenSuSE updater – nothing relevant in zypper.log or y2logRPM .

Any ideas?

jim

Thanks and a tip of the hat for your suggestion re USB drives.

I’ve had trouble mounting an NTFS partition on the hard drive, but extrapolating from your advice I modified the

<allow_inactive>no</allow_inactive>

line in the “fixed” section to say ‘yes’, rather than ‘no’.

Read-write mounting for root and for ordinary users is now automatic, and the fstab options work as they should.

If there is a risk or problem with modifying the storage policy file, maybe an expert will jump in here and comment.

I had the same problem, my fix was to add the user group to “haldaemon” group. Adding the particular user to the haldaemon group also work