View previous topic :: View next topic |
Author |
Message |
tknd n00b
Joined: 30 Jul 2005 Posts: 7
|
Posted: Wed Jun 14, 2006 8:36 am Post subject: udev not reading permissions.d files |
|
|
I'm confused.
Code: |
serv ~ # cat /etc/udev/udev.conf
# /etc/udev/udev.conf: main config file for udev
# $Header: /var/cvsroot/gentoo-x86/sys-fs/udev/files/udev.conf.post_024,v 1.2 2004/06/07 22:36:18 gregkh Exp $
#
# This file can be used to override some of udev's default values
# for where it looks for files, and where it places device nodes.
# udev_root - where in the filesystem to place the device nodes
udev_root="/dev/"
# udev_db - The name and location of the udev database.
# NOTE: this should be somewhere that is writable before
# / is mounted rw, like /dev ...
udev_db="/dev/.udev.tdb"
# udev_rules - The name and location of the udev rules file
udev_rules="/etc/udev/rules.d/"
# udev_permissions - The name and location of the udev permission file
udev_permissions="/etc/udev/permissions.d/"
# default_mode - set the default mode for all nodes that have no
# explicit match in the permissions file
# NOTE: do not set to anything else if you are not
# sure you have everything needed for normal
# user to function in the permissions file!
default_mode="0660"
# udev_log - set to "yes" if you want logging
udev_log="yes"
|
Great, default mode 0660, let's look for some permissions on the 'null' device:
Code: | serv ~ # grep null /etc/udev/permissions.d/50-udev.permissions
null:root:root:0666
|
Just to be sure...
Code: | serv ~ # ls -al /etc/udev/permissions.d/
total 4
drwxr-xr-x 2 root root 88 Jun 14 01:08 .
drwxr-xr-x 5 root root 232 Jun 11 17:40 ..
-rw-r--r-- 1 root root 3820 Mar 4 2005 50-udev.permissions
|
Drum-roll....
Code: | serv ~ # ls -l /dev/null
crw-rw---- 1 root root 1, 3 Jun 11 17:40 /dev/null
|
This is annoying because while it didn't totally break my system (it still functions about 90% of what I need it to do), it breaks my gnu screen that uses the null and ptmx devices as well as ssh'ing to other boxes from it. I know it's a permissions issue because if I run as root, everything still works, run as a lower level user, and random things don't seem to work.
More examples:
From my only permissions file:
Code: | # memory devices
random:root:root:0666
urandom:root:root:0444
mem:root:kmem:0640
kmem:root:kmem:0640
|
Code: | serv ~ # ls -l /dev/random
crw-rw---- 1 root root 1, 8 Jun 10 12:02 /dev/random
serv ~ # ls -l /dev/urandom
crw-rw---- 1 root root 1, 9 Jun 12 19:43 /dev/urandom
serv ~ # ls -l /dev/mem
crw-rw---- 1 root kmem 1, 1 Jun 10 12:02 /dev/mem
serv ~ # ls -l /dev/kmem
crw-rw---- 1 root kmem 1, 2 Jun 10 12:02 /dev/kmem
|
So it is reading the groups, but not the permissions? |
|
Back to top |
|
|
thesnowman Guru
Joined: 08 May 2003 Posts: 365 Location: Sydney, Australia
|
Posted: Wed Jun 14, 2006 10:59 am Post subject: |
|
|
permissions.d was deprecated quite a while ago - udev-051 according to the change log. You should now set permissions in custom .rules files. |
|
Back to top |
|
|
tknd n00b
Joined: 30 Jul 2005 Posts: 7
|
Posted: Wed Jun 14, 2006 6:33 pm Post subject: |
|
|
I see, sometimes the bleeding edge....bleeds.
Given the info the way I fixed it was remerging and using the new config file which had the permissions built in, though it was puzzling seeing the permission.d folder still there, must have been left since I installed the system last year.
Thanks. |
|
Back to top |
|
|
thesnowman Guru
Joined: 08 May 2003 Posts: 365 Location: Sydney, Australia
|
Posted: Thu Jun 15, 2006 12:41 pm Post subject: |
|
|
Yep, emerge will not remove any files or directories in /etc (unless there is some config or flag I don't know about). |
|
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
|
|