You are not logged in.
Hi all, I'm new to Arch after switching from Crunchbang a few days ago.
I've managed to enable automounting for my USB drives with udev and HAL, but when I try to eject them in Nautilus, I get
umount: /media/EMBARQ is not in the fstab (and you are not root)
Is there any way to allow myself to umount a USB drive as a regular user? Using sudo umount /media/XX works fine, but it's a bit irritating to have a shiny new eject button that I can't use.
EDIT: I just use Nautilus as a file manager, and not the full GNOME desktop.
Last edited by schnauzer (2009-11-11 04:24:42)
Offline
Follow the step 2:
http://wiki.archlinux.org/index.php/HAL … _Configure
Edit the /etc/dbus-1/system.d/hal.conf file and add the stuff about storage and power users.
Offline
I've already done that, but no luck. This is what my /etc/dbus-1/system.d/hal.conf looks like:
<!DOCTYPE busconfig PUBLIC
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
<busconfig>
<!-- This configuration file specifies the required security policies
for the HAL to work. -->
<!-- Only root or user hal can own the HAL service -->
<policy user="hal">
<allow own="org.freedesktop.Hal"/>
</policy>
<policy user="root">
<allow own="org.freedesktop.Hal"/>
</policy>
<!-- Allow anyone to invoke methods on the Manager and Device interfaces -->
<policy context="default">
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.DBus.Introspectable"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.DBus.Properties" />
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Manager"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.CPUFreq"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.DockStation"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.KillSwitch"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.KeyboardBacklight"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Leds"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.LightSensor"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Storage"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Storage.Removable"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Volume"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
<allow send_destination="org.freedesktop.Hal"
send_interface="org.freedesktop.Hal.Device.WakeOnLan"/>
</policy>
<!--Allow users of group power and storage to mount/umount-->
<policy group="power">
<allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
<allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
</policy>
<policy group="storage">
<allow send_interface="org.freedesktop.Hal.Device.Volume"/>
<allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>
</busconfig>
Also,
[schnauzer@wilson ~]$ groups
disk lp wheel video audio optical floppy storage scanner power users
Last edited by schnauzer (2009-11-11 15:47:53)
Offline
So how did you enable automounting? The hal.conf file only explains why you can mount them, not why they would automatically mount.
Good ideas do not need lots of lies told about them in order to gain public acceptance.
Offline
These are the udev rules I copy-pasted from http://wiki.archlinux.org/index.php/Ude … _it_exists.
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Global mount options
ACTION=="add", ENV{mount_options}="relatime,users"
# Filesystem specific options
ACTION=="add", PROGRAM=="/lib/initcpio/udev/vol_id -t %N", RESULT=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"
ACTION=="add", PROGRAM=="/lib/initcpio/udev/vol_id --label %N", ENV{dir_name}="%c"
ACTION=="add", PROGRAM!="/lib/initcpio/udev/vol_id --label %N", ENV{dir_name}="usbhd-%k"
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
ACTION=="remove", ENV{dir_name}=="?*", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
LABEL="media_by_label_auto_mount_end"
EDIT: Strangely enough, I can mount/umount discs perfectly fine.
Last edited by schnauzer (2009-11-11 17:41:53)
Offline
I'm having the exact same problem as schnauzer and using the same udev rules. I'm using the Gnome desktop though. I've tried everything I can find out there but cannot unmount from Nautilus as non-root.
Is this a problem for every new Arch install using Nautilus?
Cheers.
Ryzen 9 5950X, X570S Aorus Pro AX, RX 6600, Arch x86_64
Offline
I used another method:
I added two entries in fstab and created according folders in /mnt. I set the mount options in fstab so that the user could mount the stick.
I figured that the first USB-stick I enter will be mapped /dev/sdb1 and that points to /mnt/disk-1. If I'd insert another stick it gets mapped as /dev/sdc1 which points to /mnt/disk-2.
It's a dirty hack somehow, compared to the sleek hal solution but I find this much easier
Offline