From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Date: Thu, 31 Aug 2006 11:32:20 +0000 Subject: UDEV permissions and LFS Message-Id: <44F6C8C4.3060901@ntlworld.com> MIME-Version: 1 Content-Type: multipart/mixed; boundary="------------070109060900000305080706" List-Id: To: linux-hotplug@vger.kernel.org This is a multi-part message in MIME format. --------------070109060900000305080706 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit After trying to follow the advice on http://www.reactivated.net/writing_udev_rules.html, I am still finding it impossible to get group access to dvd on /dev/hdc and cdrom on /dev/hdd. My system is a LinuxFromScratch (LFS) version 6.1.1 using udev-056 attached. I have added this two line file to /etc/udev/rules BUS=="ide", KERNEL=="hdc", SYMLINK+="dvd", GROUP="cdrom" BUS=="ide", KERNEL=="hdd", SYMLINK+="cdrom", GROUP="cdrom" This file is saved as 10-local.rules and on failure as 60-local.rules. Restarting udev using LFS bootscripts (where $e is an exported link to the /etc/rc.d/init.d folder) I get root@lfs-6:/etc/udev/rules.d# ls -l total 24 -rw-r--r-- 1 root root 120 2006-08-31 12:05 10-local.rules -rw-r--r-- 1 root root 486 2006-08-30 00:42 15-alsa.rules -rwxr-xr-x 1 root root 5380 2006-02-07 17:09 25-lfs.rules -rw-r--r-- 1 root root 1527 2006-08-31 11:17 50-udev.rules -rw-r--r-- 1 root root 120 2006-08-31 12:18 60-local.rules root@lfs-6:/etc/udev/rules.d# $e/udev start Populating /dev with device nodes... [ OK ] root@lfs-6:/etc/udev/rules.d# echo $e /etc/rc.d/init.d root@lfs-6:/etc/udev/rules.d# ls /dev/d* -l crw-rw---- 1 root audio 14, 3 2006-08-31 12:18 /dev/dsp crw-rw---- 1 root audio 14, 19 2006-08-31 12:18 /dev/dsp1 lrwxrwxrwx 1 root root 3 2006-08-31 12:18 /dev/dvd -> hdc root@lfs-6:/etc/udev/rules.d# ls -l /dev/c* lrwxrwxrwx 1 root root 3 2006-08-31 12:18 /dev/cdrom -> hdd crw--w--w- 1 root tty 5, 1 2006-08-31 12:18 /dev/console lrwxrwxrwx 1 root root 11 2006-08-31 12:18 /dev/core -> /proc/kcore As you see the device creates the symlink but refuses to belong to group cdrom (or any ther group I care to name). I am looking to use KDiskFree for mounting and unmounting these drives I have two questions: a) How do I permanently change the group ownership? b) If I need to safely reinstall udev from source (to 07x or 098), what precautions should I take without destroying my system? (other than a giant tar ball?) ======================================================================================= (LFS udev instructions if attachment kicked off) 6.58.1. Installation of Udev Compile the package: make udevdir=/dev udevdir=/dev This tells udev in which directory devices nodes are to be created. To test the results, issue: make test. Install the package: make DESTDIR=/ udevdir=/dev install The meaning of the make option: DESTDIR=/ This prevents the Udev build process from killing any udevd processes that may be running on the host system. Udev's configuration is far from ideal by default, so install the configuration files here: cp -v ../udev-config-4.rules /etc/udev/rules.d/25-lfs.rules Run the udevstart program to create our full complement of device nodes. /sbin/udevstart 6.58.2. Contents of Udev Installed programs: udev, udevd, udevsend, udevstart, udevinfo, and udevtest Installed directory: /etc/udev --------------070109060900000305080706 Content-Type: text/html; name="udev.html" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="udev.html" 6.58. Udev-056

6.58. Udev-056

The Udev package contains programs for dynamic creation of device nodes.

Approximate build time: 0.1 SBU
Required disk space: 6.7 MB
Installation depends on: Coreutils and Make

6.58.1. Installation of Udev

Compile the package:

make udevdir=/dev
udevdir=/dev

This tells udev in which directory devices nodes are to be created.

To test the results, issue: make test.

Install the package:

make DESTDIR=/ udevdir=/dev install

The meaning of the make option:

DESTDIR=/

This prevents the Udev build process from killing any udevd processes that may be running on the host system.

Udev's configuration is far from ideal by default, so install the configuration files here:

cp -v ../udev-config-4.rules /etc/udev/rules.d/25-lfs.rules

Run the udevstart program to create our full complement of device nodes.

/sbin/udevstart

6.58.2. Contents of Udev

Installed programs: udev, udevd, udevsend, udevstart, udevinfo, and udevtest
Installed directory: /etc/udev

Short Descriptions

udev

Creates device nodes in /dev or renames network interfaces (not in LFS) in response to hotplug events

udevd

A daemon that reorders hotplug events before submitting them to udev, thus avoiding various race conditions

udevsend

Delivers hotplug events to udevd

udevstart

Creates device nodes in /dev that correspond to drivers compiled directly into the kernel; it performs that task by simulating hotplug events presumably dropped by the kernel before invocation of this program (e.g., because the root filesystem has not been mounted) and submitting such synthetic hotplug events to udev

udevinfo

Allows users to query the udev database for information on any device currently present on the system; it also provides a way to query any device in the sysfs tree to help create udev rules

udevtest

Simulates a udev run for the given device, and prints out the name of the node the real udev would have created or (not in LFS) the name of the renamed network interface

/etc/udev

Contains udev configuation files, device permissions, and rules for device naming

--------------070109060900000305080706 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 --------------070109060900000305080706 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel --------------070109060900000305080706--