You are not logged in.
G'day
I'd like to be able to unmount memory sticks as a regular user - currently when I right click on the drive > unmount, or issue
$: umount /media/10GB
this error appears:
umount: /media/10GB is not in the fstab (and you are not root)
Using gnome-shell, i686.
Contents of /etc/polkit-1/localauthority/50-local.d/10-udisks.pkla
[Storage Permissions]
Identity=unix-group:storage
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.luks-unlock;org.freedesktop.udisks.inhibit-polling;org.freedesktop.udisks.drive-set-spindown;org.freedesktop.udisks.filesystem-unmount-others;org.freedesktop.udisks.filesystem-mount-system-internal
ResultAny=yes
ResultActive=yes
ResultInactive=no
I am a member of the storage group.
My .xinitrc launches gnome shell as:
exec ck-launch-session dbus-launch gnome-session
Contents of /etc/udev/rules.d/11-media-by-label-auto-mount.rules
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"
# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"
# Global mount options
ACTION=="add", ENV{mount_options}="noatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},defaults,auto,iocharset=utf8,gid=100,uid=1000"
# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"
# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"
# Exit
LABEL="media_by_label_auto_mount_end"
Memory sticks mount properly with the correct permissions, but it would be nice to be able to unmount them without issuing a sudo umount.
Modules and Daemons in /etc/rc.conf:
MODULES=(uvcvideo usblp vboxdrv r852 ssfdc)
DAEMONS=(syslog-ng crond dbus networkmanager ntpd cupsd mysqld avahi-daemon sabnzbd samba gdm)
Any help would be greatly appreciated!
Last edited by crab (2012-01-23 02:45:22)
Offline
I had a similar issue, and it was because PolicyKit was not started. Have you checked that?
Offline
I had a similar issue, and it was because PolicyKit was not started. Have you checked that?
Apparenly it's started, though I'm not 100% sure on the method for starting PolicyKit:
$ /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
** (polkit-gnome-authentication-agent-1:2108): WARNING **: Unable to register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
Cannot register authentication agent: GDBus.Error:org.freedesktop.PolicyKit1.Error.Failed: An authentication agent already exists for the given subject
If it exists does this mean PolicyKit is running? And wouldn't PolicyKit be running if it drives automatically mount? It is just unmounting that gives a permission error. Just a guess though!
A bit more research lead me to this bug report (via xinitrc). So I tried moving /etc/X11/xinit/xinitrc.d/30-dbus somewhere then rebooting, but no difference.
Oh and the output of ck-list-sessions contains the (apparently) all important: is-local = TRUE
Any more suggestions?
Offline
Solved!
Turns out all I had to do was move /etc/udev/rules.d/11-media-by-label-auto-mount.rules to somewhere else! Gnome 3 automatically handles (some?) mounts. I remember creating them from the wiki when I couldn't get an XD card to mount.
I hope this is of use to someone in the future.
Offline