[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] CD/DVD brænding kernel 2.6. Hvorfor kun fra root?



Martin Seebach wrote:
Den 07-09-2006 16:32, skrev Jørgen Heesche:
MEN, HVORFOR er det kun root, der har skrivetilladelse til CD??.

Fordi Linux/unix er multiuser systemer - tankegangen at når man har adgang til maskinens software, har man nødvendigvis også adgang til dens hardware (og burde derfor få lov til at skrive til CDROM drevet) er ikke spor linux-agtig.


Ikke helt enig.  I Mandrake 9.1 med kernel 2.4.21 var der ikke noget
problem, det er et kernel 2.6 fænomen. Det er selvfølgelig rigtigt, at i et
multisuser system har kun systemadmistrator, root, alle rettigheder, men
jeg kan ikke se, hvorfor brugere ikke uden videre har adgang til output
til CDROM drevet.

På Ubuntu er der en brugergruppe der hedder cdrom, og cdrom-drevet ejes af root og denne gruppe:
brw-rw---- 1 root cdrom 11, 0 2006-09-07 14:43 /dev/scd0


Således skal man bare placere den/de brugere der skal kunne læse og skrive CD'ere i gruppen cdrom.

Er prøvet: /etc/group:
cdrom:x:22:jph
cdwriter:x:80:jph
 Men det gør ingen forskel.

ls -l /dev/* | grep cd viser:
lrwxrwxrwx  1 root root            3 Sep  7 20:11 /dev/cdrom -> hdc
lrwxrwxrwx  1 root root            3 Sep  7 20:11 /dev/cdrom0 -> hdc
lrwxrwxrwx  1 root root            3 Sep  7 20:11 /dev/cdrw -> hdc
brw-rw----  1 jph  cdrom     22,   0 Sep  7 20:11 /dev/hdc
lrwxrwxrwx  1 root root            5 Sep  7 20:11 /dev/ptycd -> pty/m
crw-rw----  1 jph  cdwriter  21,   0 Sep  7 20:11 /dev/sg0
crw-rw----  1 jph  cdwriter  21,   1 Sep  7 20:11 /dev/sg1
brw-rw----  1 jph  cdrom     11,   0 Sep  7 20:11 /dev/sr0
brw-rw----  1 jph  cdrom     11,   1 Sep  7 20:11 /dev/sr1
lrwxrwxrwx  1 root root            5 Sep  7 20:11 /dev/ttycd -> pty/s
/dev/cdroms:
lrwxrwxrwx  1 root root 6 Sep  7 20:11 cdrom0 -> ../hdc
drwxr-xr-x  2 root root  60 Sep  7 20:11 cd/
/dev/pktcdvd:
crw-rw----  1 root cdrom 10, 63 Sep  7 20:11 control

Disse katalogindgange fornyes af Mandriva ved hver boot.
Det er ikke SCSI-emulering og skrivning sker til device /dev/hdc,
som har owner,group = jph,cdrom
Der er forøvrigt et mærkeligt fænomen her. Ved boot i runlevel 3 og
root-login i konsollen er root ejer af alle ovennævnte devices. Ved logout og
efterfølgende userlogin ændres ejerskabet fra root til user. Ved logout af user og root-login igen skifter ejerskabet til root.
Det ser ud til at Mandriva 2006 gør sit bedste for at give en bruger adgang til at
skrive på CDROM (/dev/hdc), men det lykkes ikke; måske ligger problemet
i cdrecord.


cdrecord dev=/dev/hdc MandrakeMove-i586.iso
cdrecord: No write mode specified.
cdrecord: Asuming -tao mode.
cdrecord: Future versions of cdrecord may have different drive dependent
defaults.
Cdrecord-Clone 2.01.01a03-dvd (i686-pc-linux-gnu) Copyright (C)
1995-2005 Jörg Schilling
Note: This version is an unofficial (modified) version with DVD support
Note: and therefore may have bugs that are not present in the original.
Note: Please send bug reports or support requests to warly at mandriva.com.
Note: The author of cdrecord should not be bothered with problems in
this version.
cdrecord: Cannot allocate memory. WARNING: Cannot do mlockall(2).
cdrecord: WARNING: This causes a high risk for buffer underruns.
cdrecord: Operation not permitted. WARNING: Cannot set RR-scheduler
cdrecord: Permission denied. WARNING: Cannot set priority using
setpriority().
cdrecord: WARNING: This causes a high risk for buffer underruns.
scsidev: '/dev/hdc'
devname: '/dev/hdc'
scsibus: -2 target: -2 lun: -2
Warning: Open by 'devname' is unintentional and not supported.
Linux sg driver version: 3.5.27
Using libscg version 'schily-0.8'.Device type    : Removable CD-ROM
Version        : 0
Response Format: 1
Vendor_info    : 'PLEXTOR '
Identifikation : 'DVDR   PX-708A  '
Revision       : '1.04'
Device seems to be: Generic mmc2 DVD-R/DVD-RW.
cdrecord: Operation not permitted. Cannot send SCSI cmd via ioctl

sudo cdrecord dev=/dev/hdc MandrakeMove-i586.iso
kører bare.

Husk, cdrecord skriver direkte til devicen, mount er ligegyldigt her..

Ja, ved skrivning skal der ikke mountes, men der skal ved læsning. Det
var det, der var problemet: med SCSI-emulering kan der ikke mountes.

 lrwxrwxrwx  1 root root 31 Sep  7 09:02 /dev/sr0 ->
 scsi/host1/bus0/target0/lun0/cd

Prøv at checkke permissions på scsi/host1/bus0/target0/lun0/cd

Dette link forkommer kun ved SCSI emulering, og jeg viste det kun fordi
der ikke kan mountes.


-- Med venlig hilsen

Jørgen Heesche
mailto:sslug@sslug
Registered Linux User #401007




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-10-01, 02:02 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *