linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* UDEV permissions and LFS
@ 2006-08-31 11:32 Andrew
  2006-08-31 16:46 ` Bryan Kadzban
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew @ 2006-08-31 11:32 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 2976 bytes --]

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


[-- Attachment #2: udev.html --]
[-- Type: text/html, Size: 11047 bytes --]

[-- Attachment #3: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #4: Type: text/plain, Size: 226 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: UDEV permissions and LFS
  2006-08-31 11:32 UDEV permissions and LFS Andrew
@ 2006-08-31 16:46 ` Bryan Kadzban
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Kadzban @ 2006-08-31 16:46 UTC (permalink / raw)
  To: linux-hotplug


[-- Attachment #1.1: Type: text/plain, Size: 1541 bytes --]

On Thu, Aug 31, 2006 at 12:32:20PM +0100, Andrew wrote:
> 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"

I assume you mean /etc/udev/rules.d, right?

> This file is saved as 10-local.rules and  on failure as 60-local.rules.

"On failure"?  Not sure what that means...  You should only need one
copy of this file, and 10-local.rules should be good enough.

> I get
> <...>
> 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).

Um, the owner/group/permissions on a symlink have no effect whatsoever.
I'm not even sure if you *can* change them, but even if so, it won't do
you any good.

The rules you posted above will cause udev to change the GID on the
/dev/hdc and /dev/hdd device files, not the symlinks.  But the kernel
will not apply the permissions of the symlinks, only the permissions on
their targets, so this is fine.


[-- Attachment #1.2: Type: application/pgp-signature, Size: 191 bytes --]

[-- Attachment #2: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 226 bytes --]

_______________________________________________
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-08-31 16:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-31 11:32 UDEV permissions and LFS Andrew
2006-08-31 16:46 ` Bryan Kadzban

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).