You are not logged in.

#1 2006-12-24 22:08:54

jardasmid
Member
Registered: 2006-02-10
Posts: 25

Can't unmount an usb2 pen drive as user, only as root

After I plug in an usb2 pen drive, kde popups the window and let me mount and open it in Konqueror (as normal user and as supersuser). But if I right click on the pen drive icon and select "Safely remove" it only works as root, never as user, even if it is mounted as user. Entry in fstab solves the problem, but it is the bad solution, since I can mount second pen drive with another device node. I think, this must be something bad with HAL.

Offline

#2 2006-12-25 07:15:04

Acid7711
Member
From: Chicago, IL
Registered: 2006-08-18
Posts: 300
Website

Re: Can't unmount an usb2 pen drive as user, only as root

When I was running KDE and even now in Gnome, it's always mounted under root.  The user is able to mount and unmount still though. Kinda a shot in the dark here, my user account is a member of the following groups: dbus, disk, hal, storage

Stupid and of little help I know, but maybe it's something. I'm quite unsure what some of those groups specifically use, just laying down a baseline that works with mine. My fstab contains no help for these either.

Offline

#3 2006-12-25 11:20:26

jardasmid
Member
Registered: 2006-02-10
Posts: 25

Re: Can't unmount an usb2 pen drive as user, only as root

I'm not in dbus, hal nor disk groups. I'll try to add myself to dbus and hal groups, but I don't think you should be in disk group, because it lets you to patrition harddisks as normal user!

Offline

#4 2006-12-25 12:35:49

dienadel
Member
Registered: 2005-12-23
Posts: 179

Re: Can't unmount an usb2 pen drive as user, only as root

I don't know exactly what is the solution, but you can try mine, that at least works for me.

root:x:0:root
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin
adm:x:4:root,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon
mem:x:8:
kmem:x:9:
wheel:x:10:root
ftp:x:11:
mail:x:12:
log:x:19:root
games:x:20:
slocate:x:21:
smmsp:x:25:
dbus:x:81:
hal:x:82:
avahi:x:84:
network:x:90:
video:x:91:1,2,3
audio:x:92:1,2,3
optical:x:93:1
floppy:x:94:
storage:x:95:1
scanner:x:96:
camera:x:97:1
power:x:98:
nobody:x:99:
users:x:100:

The real user names are changed by 1, 2, 3.

- Audio is for sound ;-)
- Video is for watching TV. For avi videos, f.e., isn't neccesary
- Optical is only for burn CD
- Storage is for accessing USB sticks, reading CD...
- Camera is for using camera via digikam (PTP mode), and not necessary if accessed via USB

No fstab entries for USB, CD...

These settings work for me. Hope it helps.

Bye

Offline

#5 2006-12-25 16:30:43

jardasmid
Member
Registered: 2006-02-10
Posts: 25

Re: Can't unmount an usb2 pen drive as user, only as root

Even if I am in the folowing groups, it won't unmount unless I'm root:

$ groups
tty disk wheel dbus hal video audio optical floppy storage scanner camera users

I know I shouldn't be in all of those groups, but it is only a test.
Does your USB disk contain patritions too? It is very interesting, that it works for you. Maybe I will install gnome to make sure, it is not just a problem of KDE.

Offline

#6 2006-12-26 10:03:02

dienadel
Member
Registered: 2005-12-23
Posts: 179

Re: Can't unmount an usb2 pen drive as user, only as root

I've no partitions in the USB device. The only extrange thing is the related in this post:
http://bbs.archlinux.org/viewtopic.php?t=27988

But, what happens to you, no idea.

Offline

#7 2006-12-26 12:51:11

patroclo7
Member
From: Bassano del Grappa, ITALY
Registered: 2006-01-11
Posts: 915

Re: Can't unmount an usb2 pen drive as user, only as root

I do not use kde, hal and so on, but I am able to mount and unmount my USB stick as a user provided that it is listed in fstab with the "user" option.

/dev/sdb /mnt/usbkey vfat  user,noauto 0 0

EDIT: oh sorry me, I realized only now that you have written that you do not like this method.


Mortuus in anima, curam gero cutis

Offline

#8 2006-12-26 13:07:42

Mr Green
Forum Fellow
From: U.K.
Registered: 2003-12-21
Posts: 5,896
Website

Re: Can't unmount an usb2 pen drive as user, only as root

seems to be many problems with mounting devices in Arch at the moment [may not be related to Arch itself!]

Hal Dbus Udev its all going mad

I use pmount most of the time

Whats going on ?

I mean you can add udev rule but why should you have to hack a config file every time you buy a piece of hardware should the udev system not pick up and mount device ?

Or am I losing the plot  :?


Mr Green

Offline

#9 2006-12-26 15:23:09

jardasmid
Member
Registered: 2006-02-10
Posts: 25

Re: Can't unmount an usb2 pen drive as user, only as root

Ok. I don't mind, if I have device entry in fstab, but i need it to have static device name. So, I have read
http://wiki.archlinux.org/index.php/Usi … o_a_device and created udev rule, changed fstab entry to

/dev/usbdrive              /media/flash    auto   rw,nosuid,noauto,nodev,user,utf8,umask=0 0 0

Now I get "Access denied" if I try to mount it in KDE, but if I execute "mount /dev/usbdrive", it mounts and I am able to unmount it in KDE. I think, it's because device /dev/usbdrive has owner root:root, but it should be "root:storage", and it's permission are "lrwxrwxrwx" while /dev/sdd1's are "brw-rw----" and owner is "root:storage".

Offline

Board footer

Powered by FluxBB