Hi!

I have a similar problem..

$ groups
stw15 audio plugdev

# ls -l /usr/bin/pmount
-rwsr-xr-- 1 root plugdev 29280 2006-09-11 08:48 /usr/bin/pmount
#ls -l /usr/bin/pumount
-rwsr-xr-- 1 root plugdev 22316 2006-09-11 08:48 /usr/bin/pumount

My udev rule:
BUS=="usb", ACTION=="add", KERNEL=="sd**", RUN="/usr/bin/pmount --sync
--umask 000 %k"
In this way, the mount of a flash drive works, however, the pumount command
don't works as is written below.

$ ls /media
cdrom  cdrom0  floppy  floppy0  sda1  sda6  sdb1

$ pumount -d /media/sdb1
checking whether /media/sdb1 is a mounted directory
resolved mount point /media/sdb1 to device /dev/sdb1
resolved /dev/sdb1 to device /dev/sdb1
Error: device /dev/sdb1 was not mounted by you

Changing the umask, or writting the rule without arguments, like
"/usr/bin/pmount %k", the flash drive was not mounted.
But, if i execute this pmount command (/usr/bin/pmount --sync --umask 000
/dev/sdb1) in a shell like a regular user instead of the udev rule, the
events of mounting and umounting proceeds successfully! The output of this
way, pmounting in a shell, just the main lines with arguments:

spawnv(): executing /bin/mount '/bin/mount' '-t' 'udf' '-o'
'nosuid,nodev,user,sync,atime,noexec,uid=1003,gid=1003,umask=000,iocharset=utf8'
'/dev/sdb1' '/media/sdb1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'udf' '-o'
'nosuid,nodev,user,sync,atime,noexec,uid=1003,gid=1003,umask=000'
'/dev/sdb1' '/media/sdb1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'iso9660' '-o'
'nosuid,nodev,user,sync,atime,noexec,uid=1003,gid=1003,iocharset=utf8'
'/dev/sdb1' '/media/sdb1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'iso9660' '-o'
'nosuid,nodev,user,sync,atime,noexec,uid=1003,gid=1003' '/dev/sdb1'
'/media/sdb1'
spawn(): /bin/mount terminated with status 32
spawnv(): executing /bin/mount '/bin/mount' '-t' 'vfat' '-o'
'nosuid,nodev,user,quiet,shortname=mixed,sync,atime,noexec,uid=1003,gid=1003,umask=000,iocharset=utf8'
'/dev/sdb1' '/media/sdb1'

How can I use the pumont in a removal script execute by a regular user in
the plugdev group?

Thanks for attention,


-- 
Edison Silveira de Sousa

Reply via email to