Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
12-01-2007, 08:32 PM
|
#1
|
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Rep:
|
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 08:44 AM.
Reason: to make the fstab entries easier to read
|
|
|
|
12-01-2007, 09:46 PM
|
#2
|
|
Senior Member
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054
Rep:
|
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.
|
|
|
|
12-02-2007, 08:27 AM
|
#3
|
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
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
|
|
|
|
12-02-2007, 08:43 AM
|
#4
|
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
That didn't work
|
|
|
|
12-02-2007, 09:06 AM
|
#5
|
|
Member
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 474
Rep:
|
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 09:07 AM.
|
|
|
|
12-03-2007, 08:00 AM
|
#6
|
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
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 02:06 PM.
Reason: forgot to add ls -l /dev/ipod output
|
|
|
|
12-03-2007, 11:02 AM
|
#7
|
|
Member
Registered: Dec 2005
Location: "The South Coast of Texas"
Distribution: Slackware64-current
Posts: 474
Rep:
|
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
|
|
|
|
12-03-2007, 01:01 PM
|
#8
|
|
Guru
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,594
|
Also, make sure you add yourself to the right groups (plugdev, audio, video, cdrom, floppy).
|
|
|
|
12-04-2007, 02:05 PM
|
#9
|
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
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
|
|
|
|
12-04-2007, 02:11 PM
|
#10
|
|
LQ Newbie
Registered: Oct 2007
Posts: 14
Original Poster
Rep:
|
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.
|
|
|
|
12-04-2007, 06:39 PM
|
#11
|
|
Member
Registered: Dec 2006
Distribution: Slackware
Posts: 507
Rep:
|
watch out though, cause iv'e had my IPOD be on SDA2 and SDB2 as well
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:04 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|