LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 12-01-2007, 09:32 PM   #1
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
udev permissions problems


I tried posting this in the hardware forum, but nobody even replied...
thought I might try it here:

So my USB devices work fine - mount, unmount, eject, all of that, but to make things easier for myself, I wrote some udev rules and fstab entries for my iPod and usb flashkey - I thought that this would make Amarok a little bit easier to use (no separate umount and then eject after syncing).

The problem is that I can mount my iPod/flashkey as myself, but have to umount and eject them as superuser

here are the udev rules:

BUS=="usb", SYSFS{serial}=="****************", KERNEL=="sd?2", GROUP="users", OWNER="kyle", SYMLINK=="ipod"

BUS=="usb", SYSFS{serial}=="****************", KERNEL=="sd?1", GROUP="users", OWNER="kyle", SYMLINK=="flashkey"

*** I'm not sure if showing the serial numbers is a security issue, but a little but of paranoia is healthy

here are the fstab entries:

/dev/ipod /media/ipod auto users,noauto,rw,defaults 0 0
/dev/flashkey /media/flashkey auto users,noauto,rw,defaults 0 0

here's the error I get when I try to eject as kyle (not root)

umount: /dev/sda1: not mounted
umount: /media/flashkey: must be superuser to umount
umount: /dev/sda1: not mounted
umount: /media/flashkey: must be superuser to umount
eject: unmount of `/media/flashkey' failed

I'm running Slackware 12.0
Kernel 2.6.21.5-smp (optimized)

Thanks in advance

Last edited by lyke; 12-02-2007 at 09:44 AM. Reason: to make the fstab entries easier to read
 
Old 12-01-2007, 10:46 PM   #2
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
I am not sure as I don't have an ipod .. but your symlink and fstab only makes sure for sdb2 of ipod. Ipod actually consists of sdb1/sdb2 as well as sdb . (assuming ipod is put to sdb by udev). I think that you don't have control over sdb1/sdb , only over sdb2.

but better wait for someone who HAS an ipod to reply.
 
Old 12-02-2007, 09:27 AM   #3
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
thats right, sdb1 is the boot partition, and never really needs to be mounted unless you want to see the firmware - this is something I do ONLY on my windows machine because all I ever need to do in sdb1 is update firmware every now and then.

I'll see what happens when I write some udev/fstab for the sdb1, and if that works I'll have to look for the second partition on my flashkey. (It shows up as both a cd-rom drive and a removable storage device in windows, but udevinfo only shows one partition... I think it has something to do with this "u3 smart" silliness)

thanks
 
Old 12-02-2007, 09:43 AM   #4
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
That didn't work
 
Old 12-02-2007, 10:06 AM   #5
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 492
Blog Entries: 1

Rep: Reputation: 55
I don't have an ipod either, so this may be garbage, but what ARE the permissions on your device after it is mounted? If you need to, you can change them with your udev statement.
Regards,
Bill

Last edited by TSquaredF; 12-02-2007 at 10:07 AM.
 
Old 12-03-2007, 09:00 AM   #6
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
ls -l /dev/ipod

lrwxrwxrwx 1 root udev 4 2007-12-04 15:02 /dev/ipod -> sda2

ls -l /media
...
drwxr-xr-x 2 root udev 4096 2006-09-25 20:50 dvd0
drwxr-xr-x 2 root udev 4096 2006-09-25 20:50 cdrom0
drwxr-xr-x 9 kyle users 16384 1969-12-31 19:00 ipod
...

Last edited by lyke; 12-04-2007 at 03:06 PM. Reason: forgot to add ls -l /dev/ipod output
 
Old 12-03-2007, 12:02 PM   #7
TSquaredF
Member
 
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 492
Blog Entries: 1

Rep: Reputation: 55
Are you sure your udev rule is being followed? It makes an "ipod" symlink, which per your last post does not exist. Your mount point permissions appear to be OK, although I wonder at the date. I would think you would be able to unmount it & have no clue why you can't.
Regards,
Bill
 
Old 12-03-2007, 02:01 PM   #8
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Also, make sure you add yourself to the right groups (plugdev, audio, video, cdrom, floppy).
 
Old 12-04-2007, 03:05 PM   #9
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
whoops looks like I forgot to cut and paste....

ls -l /dev/ipod
lrwxrwxrwx 1 root udev 4 2007-12-04 15:02 /dev/ipod -> sda2

I'll try adding myself to those groups, too, thanks texmex
 
Old 12-04-2007, 03:11 PM   #10
lyke
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
mm still no go

I'm done screwing around with this, I think I'll just add myself to the sudoers file and be done with it
I can write to the ipod/flashkey just fine. It's unmounting that's the problem.
 
Old 12-04-2007, 07:39 PM   #11
C-Sniper
Member
 
Registered: Dec 2006
Distribution: Slackware
Posts: 507

Rep: Reputation: 33
watch out though, cause iv'e had my IPOD be on SDA2 and SDB2 as well
 
  


Reply

Tags
fstab, udev


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Treo 650 permissions udev? smOk3 Slackware 8 12-08-2007 09:57 PM
udev permissions problems lyke Linux - Hardware 1 12-02-2007 11:11 AM
udev /dev/null permissions The_Outlander Slackware 2 08-29-2007 09:00 AM
/etc/udev/permissions.d on Slack ? Kocil Slackware 3 11-29-2005 03:57 AM
udev permissions.d not read jonman364 Linux - Software 1 02-21-2005 05:08 PM


All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration