Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 02-19-2005, 09:34 AM   #1
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Rep: Reputation: 30
Slackware 10.1 + Udev Permissions and USB Drives

I've gotten udev working in Slackware 10.1 and it works great except for two little annoyances.

1) I can't seem to find a howto that covers modifying device permissions. I would like to change my /dev/hdc from 660 to 666 because it is a CD-RW. I could just use groups to solve it, but the point is I don't know how to change the permission udev assigns and I'd like to learn. Anyone know of a good howto?

2) I have a USB external drive that I created a rule for, it get's assigned to ub?1 and has a symlink called pendrive that points to ub?1. This works perfectly except for on bootup. I have an entry in my fstab to mount /dev/pendrive into /mnt/pendrive.

The problem is, during boot it seems that udev hasn't taken care of the usb drive yet when it gets to mounting the partitions in fstab. If I login and then run mount -a as root it mounts the drive fine. I stuck mount -a in my rc.local but that seems like a cheesy fix.

Google hasn't been super helpful on these for some reason. :/

Any help is appreciated.

Old 02-19-2005, 09:54 AM   #2
Andrew Benton
Senior Member
Registered: Aug 2003
Location: Birkenhead/Britain
Distribution: Linux From Scratch
Posts: 2,073

Rep: Reputation: 64
To change the permissions udev assigns edit /etc/udev/permissions.d/udev.permissions and change
# disk devices
# disk devices
For the second problem, with the USB flash memory, the problem is that udev doesn't create the node in /dev until slightly after the module is inserted into the kernel. If you can load the ub module before udev is run it should solve the problem. The best way to fix that issue would be to build the ub driver into the kernel, then udev will create the node in /dev on boot.
Old 02-21-2005, 07:38 PM   #3
Registered: Mar 2003
Location: USA
Distribution: Slackware-current
Posts: 155

Original Poster
Rep: Reputation: 30
Actually, tried exactly that in udev.permissions and it didn't work. However, in udev.rules there is a line at the top of the file that deals with cdroms like this:

BUS="ide", KERNEL="*[!0-9]", PROGRAM="/bin/cat /proc/ide/%k/media", RESULT="cdrom*", NAME="%k", GROUP="cdrom", MODE="0660"
I changed the MODE to "0666" and it worked just as I intended. I presume the MODE key in the rules file takes precedence over the permissions file.

You suggestion for the USB drive worked. I removed the ub driver since it claims to cripple usb_storage so now my drive shows up as sdx like it used to. Then I just used rc.modules to modprobe the proper module in on boot.

Thanks for the help.
Old 03-07-2005, 09:12 PM   #4
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
What version of udev are you using? If it's 0.54 there are some problems with the permissions in that version. Most reports I've seen say that switching back to udev 0.50 fixes it.

Also, if it was me, I'd DITCH ub and use the standard usb-storage. But that's just me.



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
Changing permissions on USB external drives theufman Linux - Hardware 9 11-29-2005 09:08 PM
/etc/udev/permissions.d on Slack ? Kocil Slackware 3 11-29-2005 02:57 AM
Slackware and USB drives? carlosinfl Slackware 2 06-12-2005 05:48 PM
udev permissions.d not read jonman364 Linux - Software 1 02-21-2005 04:08 PM
udev, USB Flash Drives, and usb-mount talkingwires Debian 13 11-07-2004 12:15 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:22 PM.

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