Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 85463

Summary: udev gives wrong permissions to /dev/sg0
Product: Gentoo Linux Reporter: marco <maggoi>
Component: [OLD] Core systemAssignee: Greg Kroah-Hartman (RETIRED) <gregkh>
Status: RESOLVED CANTFIX    
Severity: minor CC: g1gsw
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description marco 2005-03-15 23:07:56 UTC
When I hotplug my usb burner, udev generates /dev/sg0, but it's owned all by root.
 Thus only root can burn CDs. To change this i have inserted the folowing line into. 
/etc/udev/rules.d/50-udev.rules

BUS="scsi", KERNEL="s[grt][0-9]*", SYSFS_type="5", NAME="%k", MODE="0660", GROUP="cdrom"

think this line should be inluded as a default. I'm using sys-fs/udev-54.

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




emerge info 
Portage 2.0.51.19 (default-linux/x86/2004.0, gcc-3.4.3, glibc-2.3.4.20050125-r0, 
2.6.11-gentoo-r3 i686) 
================================================================= 
System uname: 2.6.11-gentoo-r3 i686 Intel(R) Celeron(R) CPU 1.70GHz 
Gentoo Base System version 1.6.10 
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Feb 18 2005, 08:58:45)] 
dev-lang/python:     2.3.5 
sys-devel/autoconf:  2.13, 2.59-r6 
sys-devel/automake:  1.8.5-r3, 1.7.9-r1, 1.5, 1.9.5, 1.6.3, 1.4_p6 
sys-devel/binutils:  2.15.92.0.2-r6 
sys-devel/libtool:   1.5.14 
virtual/os-headers:  2.6.8.1-r2 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-march=i686 -O3 -pipe -fomit-frame-pointer" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms" 
GENTOO_MIRRORS="ftp://pandemonium.tiscali.de/pub/gentoo/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="x86 X aalib acpi alsa apm arts audiofile avi bash-completion berkdb bindist 
bitmap-fonts bluetooth cdr cjk crypt cups curl directfb divx4linux dvd dvdr dvdread 
emboss encode esd ethereal fam flac font-server foomaticdb fortran gdbm ggi gif 
gphoto2 gpm gps gstreamer gtk gtk2 imagemagick imlib ipv6 irmc jabber jack java 
jpeg kde kdepim ldap lesstif libg++ libwwwlirc mad memlimit mikmod mmx motif 
mp3 mpeg mssql mysql nas ncurses nls odbc oggvorbis opengl oss pam pdflib perl png 
pnp python qt quicktime readline real ruby samba scanner sdl slang snmp speex spell 
sse ssl svg svga tcltk tcpd tiff truetype truetype-fonts type1-fonts usb xine xml xml2 
xmms xosd xv xvid zlib" 
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-03-23 23:45:36 UTC
Use the /dev/cdrom symlinks instead.  They will point to the proper device.

We can't make this a generic "sg is always a cdrom" rule, as that is not the case for 99% of the time.
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2005-07-15 10:58:08 UTC
*** Bug 99137 has been marked as a duplicate of this bug. ***
Comment 3 Colin Tinker 2005-07-15 11:25:38 UTC
k3b will not allow normal users to write a cd unless sg* is also in the cdrom 
group even thought it is pointing at cdrom -----> sr0.  I am not a programmer 
but surely udev could interrogate the device and if it was a cdrom put it in 
the correct group? 
Comment 4 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-07-15 21:56:04 UTC
If you can figure out a way, sure.  But you should not need sg to write a
cdrom, right?