[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: permissions with udev/pmount?



Hi,

H. S. wrote:

Apparently, _Nicolas de Sereville_, on 24/12/04 05:13,typed:

Hi list,

I have the following problem using debian sid (kernel 2.6.8-1). I am trying to get an icon automatically when I plug in my usb stick or camera. I use udev / hal / gnome-volume-manager. As a normal user the links in /dev are created following the udev rules file, but the device is not mounted (pmount problem?) and hence doesn't appear on my desktop.

Starting a X session as root, everything is working correctly. My usb stick and camera are detected, mounted and a nice icon appears on the desktop.

So I guess I have a problem of permissions or groups for a normal user but I cannot figure out what? Following a few recent threads concerning this topic in the archives I made me member of the "plugdev" and "hal" (necessary?) group, and the device node in /dev are created in the "hal" group.

Any help will be very apreciated!
Nico


A few technical information:
1- udev rules for my usb stick:
BUS="usb", KERNEL="sd*", SYSFS{product}="USB Mass Storage Device", NAME="gyp-cl-%k", SYMLINK="gyp-cl-usb%n", MODE="0660", GROUP="hal"

2- /etc/fstab information:
/dev/gyp-cl-usb /media/stick auto rw,user,noauto,sync 0 0


I was having a similar problem and filed a bug report (I was using Sarge and kernel 2.6.9). You can find the complete bug reports on http://www.debian.org/Bugs/ by find a bug with the number 286579.

In Sid, using kernel 2.6.9 (2.6.9-1-686-smp to be more precise), I can see the icon when I insert a USB stick in Inspiron 5160 Dell laptop. I would suggest try this new version of the kernel.

I installed the kernel 2.6.9 through "apt-get install kernel-image-2.6.9-1-k7", but nothing is changing. When I plug in my stick and camera, the devices nodes are created in /dev but the devices are not mounted, neither as a user nor as root (which used to work a few days ago!). I don't remember having changed anything apart from upgrading the system.

The versions of some packages are given here:
ii  dbus-1         0.22-3         simple interprocess messaging system
ii  udev           0.050-2        /dev/ management daemon
ii  hotplug        0.0.20040329-1 Linux Hotplug Scripts
ii  hal            0.4.2-5        Hardware Abstraction Layer
ii gnome-volume-m 1.1.2-5 GNOME daemon to auto-mount and manage media

Reading the man pages of pmount it seems that a few conditions should be verified, which I think is the case:
The mount will succeed if all of the following conditions are met:

- <device> is a block device in /dev/
- <device> is not handled by /etc/fstab (if it is, pmount calls
'/bin/mount <device>' to handle this transparently; supplying a label is not
 allowed in this case)
- <device> is not already mounted according to /etc/mtab and /proc/mounts
- if the mount point already exists, there is no device already mounted at it
 and the directory is empty
- <device> is removable (i. e. on USB or FireWire bus, or
 /sys/block/drive/removable == 1)
- <device> is not locked (see below)

However when I use pmount in a terminal as a normal user ("pmount"), it tells me:
zsh: permission denied: pmount.

Can someone having udev/hal/hotplug/gnome-volume-manager running check the permission of the pmount file. I have:
-rwSr--r--  1 root plugdev 22K 2004-12-16 19:24 /usr/bin/pmount

I tried to make executable this file for everybody and then I can pmount manually the device (pmount /dev/gyp-cl-usb /stick) but it doesn't work automatically when I insert my stick.

Well as you can see I am stuck, so any ideas are welcomed!
Nico




Reply to: