View previous topic :: View next topic |
Author |
Message |
_loki_ l33t
Joined: 18 Dec 2003 Posts: 680 Location: in the shell
|
Posted: Fri Apr 15, 2005 8:25 am Post subject: udev configuration issuses |
|
|
Hallo, yesterday night I spended some hours on udev..- this post should be both, a collection of things I think I have understand know and also some questions about things I still don't understand at all. My problem was that I didn't had writte access as user on /dev/hdc, which is my cdwriter. I founf a lot of posts reagrding this issuses..- but after a time I got the feeling that most of them are outdated by now; In the ending I was able to solve my problem, but actually not in a way I wanted in the first place.. After some time I realized that my problem wasn't about permissions (udev generally sets them as 660), but more about the group the device belongs to. When I read the right articles all these things are configurated within:
The contend of:
Code: |
/etc/udev/permissions.d/
|
seems not to be used anymore since version 0.51..
From the beginning there is one file in /etc/udev/rules.d/:
witch comes with gentoo and does a good job, if you don't have any speciall problems. What I think is the right way to change something in the udev-rules, is to define a local rule file like:
Code: |
/etc/udev/rules.d/10-udev.rules
|
which has priority to the file starting with "50". If I'm not wrong there you can change permissions, groups and certain things for specified devices..
That, for me, did work partly; I could change the permissions of my device, but I couldn't change the group: My /dev/hdc is defined by udev in the "cdrom" group, I wanted it to be in the "cdrw" group..- this is what I wrote to /etc/udev/rules.d/10-udev.rules:
Code: | # cdrom/dvd devices
BUS="ide", KERNEL="hdc", MODE="0660", GROUP="cdrw"
|
As said before chaging the permissions (for example to 666) gave an instant success after executing
but changing the group gave no differences at all.. Am I doing something wrong?
Another interessting thing is about pam, which I thought was the "bad package" at first. There are many posts that pam is confussing permissions on console login regarding what is in:
Even if udev sets permissions correctly, pam could overwritte them by login..
After all I don't even had that file on my system and I don't think this was one of my problmes..- does anybody know if it is speared in new versions of pam? I did a fresh install of the whole system when 2005.0 came out (maybe 2 to 3 weeks ago)..
In the ending I fixed everything by adding my user to the "cdrom" group which has write access on /dev/hdc..- after that I could burn cds again, Ii just realized that udev is really powerful customizing your devices, and if I knew how it really works it could be even more powerful.. |
|
Back to top |
|
|
Gentree Watchman
Joined: 01 Jul 2003 Posts: 5350 Location: France, Old Europe
|
Posted: Fri Apr 15, 2005 6:49 pm Post subject: |
|
|
I had pam screwing things nicely serveral month back. I still get my teeth grating when I type it. I shall never have a relationship with someone called Pamela !
I locked pam down to 0.77 where it did not actually do much and all was fine.
I have no idea if the issues are resolved , but it was irrelvant to my system anyway so I locked it out.
Keep us posted on udev. I am trying to set it up but I dont even get /dev/hda devices just now. devfs was a doddle.
I suspect udev is too powerful in that it needs careful tweeking and is less resistant to hardware changes.
HTH _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
Gentoo because I'm a masochist
AthlonXP-M on A7N8X. Portage ~x86 |
|
Back to top |
|
|
Nil_Spaar Apprentice
Joined: 10 Jul 2004 Posts: 179 Location: Berlin, Germany
|
Posted: Fri Apr 15, 2005 9:59 pm Post subject: |
|
|
I think adding your user to the "cdrom" group is exactly the right way to solve this. To play games you must be in the games group, to su you must be in the wheel group. To play music you must be in the audio group (at least on debian, not sure if it's necessary on gentoo). That is (part of) what groups are for.
But when I checked I found out that /dev/hdb is owned by "myuser:cdrom" and has rights 600 and so I can burn CDs without being in the cdrom group. And I never touched anything on pam or udev. I find it really strange that these things work sometimes out of the box and sometimes not at all.
I'll look into this a bit more and post when I've found something interesting. |
|
Back to top |
|
|
_loki_ l33t
Joined: 18 Dec 2003 Posts: 680 Location: in the shell
|
Posted: Sat Apr 16, 2005 1:25 am Post subject: .. |
|
|
I still think that the "cdrw" group woulf be the better one to allow users writing on their cd devices..- but anyways that's something users should be able to define like they want it to be using udev! That's exactly the point I don't get so fare as I think the chages I made should have changed tings like I wnated them to be, and it didn't really work..
If there is a udev guru out there how could tell me what I did wrong, I'll appreciate! |
|
Back to top |
|
|
Tlaloc Guru
Joined: 21 Feb 2005 Posts: 451 Location: Europe - Alps - Tyrol
|
Posted: Sat Apr 16, 2005 2:10 pm Post subject: |
|
|
@_loki_
Are there special reasons why you are using the testing version of udev or are you completely on ~ anyway?
I am asking because I have done a 2005.0 stage 3 install recently with udev and am interested in the topic too.
I have had some problems in burning with my external firewire/usb dvd writer and am trying to figure out where they really come from. My internal cd-writer is working fine though, but I can also affirm that access rights seem to get changed somehow for my internal optical drives as they are not the ones specified in my 50-udev.permissions file (Or did I change them with the k3b setup program? Gonna check and login as another user later..).
I have also noticed that with stable sys-fs/udev-045 I am running access rights for /dev/sg0 (my external dvd writer) get set to root:disk (like they should according to 50-udev.permissions). Therefore I added users that should be allowed to burn CDs or DVDs to the disk group, since I didn't know that I could specify that in a proper way. Is this still the default behaviour for scsi cdrom devices?
Bye, Valentin. |
|
Back to top |
|
|
_loki_ l33t
Joined: 18 Dec 2003 Posts: 680 Location: in the shell
|
Posted: Sat Apr 16, 2005 4:33 pm Post subject: |
|
|
My whole system run on ~, so fare quite stable, the only thing I'm still having problmes with is love-sources, and that's not even in portage (but you can gensync it if you want, it's in gentoo-de) . Anyway, I didn't tried versions older that 0.51.. Actually the versoin I'm running is 0.56. Permissions for older versions were changed in:
Code: |
/etc/udev/permissions.d/
|
where udev follows the same rules like in ruled.d. Means the priorities of the files are: 10>20>..>50
there is an example at: http://gentoo-wiki.com/HOWTO_Griffin_PowerMate_with_UDEV_and_Kernel_2.6.x
this is not working with udev versions>0.51!!! There permissions are setted within the udev-rules. Groups are defined in rules.d in ealier versions as well as in newer. If your having problems with permissions that are not followed by the udev-rules it could be pam that's messing them up when you login at console, you could try to delete /etc/security/console.perms (or better move it somewhere else), to try if this is the reason.
As I said bevor, I'm not sure about all those udev things, I still have problems setting everything up like I want it to be myself; it would be cool if there was someone who is really into that stuff and can tell us how it really is, or at least it's supposed to be! Hope this helps anyway!!!
By the way: there is also a good HOWTO on individualise device settings with udev on the wiki: http://de.gentoo-wiki.com/Udev_Rules
If you had for example problems with different sda devces that need different filresystems that can help! |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|