View previous topic :: View next topic |
Author |
Message |
nordic bro Guru

Joined: 25 Oct 2003 Posts: 585
|
Posted: Sun Apr 12, 2009 2:58 am Post subject: two sg are root, two aren't |
|
|
I don't understand why this is happening (cdrom, sr_mod and sg are modules):
ls -la /dev/sg*
crw-rw---- 1 root root 21, 0 Apr 11 09 14:30 /dev/sg0
crw-rw---- 1 root root 21, 1 Apr 11 09 14:30 /dev/sg1
crw-rw---- 1 root cdrom 21, 2 Apr 11 09 14:30 /dev/sg2
crw-rw---- 1 root cdrom 21, 3 Apr 11 09 14:30 /dev/sg3
sg0 is my burner and when user tries "cdrdao write --device 8,0,0 ..." I see
Code: | Error trying to open /dev/sg0 exclusively (Permission denied). |
if I change /dev/sg0 to "cdrom" group then the cmd works fine.
in /etc/udev/* the only "sg" I can find are these:
Code: |
/etc/udev/rules.d/50-udev.rules:KERNEL=="sg[0-9]*", ACTION=="add", ATTRS{type}=="4|5", GROUP="cdrom" |
Code: |
/etc/udev/rules.d/50-udev.rules_mine:BUS=="scsi", KERNEL="sg[0-9]*", ACTION=="add", DRIVER=="sr", GROUP="cdrom"
|
can someone point out why sg2,3 are "cdrom" group but sg0,1 aren't?
thanks. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55025 Location: 56N 3W
|
Posted: Sun Apr 12, 2009 8:16 pm Post subject: |
|
|
nordic bro,
Do you have a /etc/udev/rules.d/70-persistent-cd.rules file ?
If so move it out of the /etc/udev/rules.d/ directory and reboot.
That should cause the file to be rewritten.
If all is well, you can delete the old 70-persistent-cd.rules file.
Note, the file names in /etc/udev/rules.d/ serve only to order the way the files are used. Thats why you need to me the file elsewhere. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
 |
nordic bro Guru

Joined: 25 Oct 2003 Posts: 585
|
Posted: Mon Apr 13, 2009 9:05 pm Post subject: |
|
|
thanks for the tip. I moved 70*cd* to / but it wasn't re-created until I also moved 75-cd-aliases-generator.rules out of rules.d too. then I ended up with exactly the same thing I had when I started (and no change to /dev/sg{0,1})
besides becoming a udev writin fool, is there some tip you know of where maybe I can figure out why sg0,1 don't get cdrom group but sg2,3 do? (user belongs to "cdrom" group).
I have /dev/dvdr -> sr1 (ide dvd reader) and /dev/dvdrw -> sr0 (ide dvd burner). my mb is sata + jmicron (everything besides the sg device groups has worked fine for 18 months; ata/atapi/mfm is deselected and only use "serial ata" fwiw).
when I do "cdrecord scanbus" it says 8,0,0 is my burner. if user does 'cdrdao write --device /dev/dvdrw ..." it will work; "cdrdao write --device 8,0,0 ..." generates the privileges problem for sg0. |
|
Back to top |
|
 |
NeddySeagoon Administrator


Joined: 05 Jul 2003 Posts: 55025 Location: 56N 3W
|
Posted: Tue Apr 14, 2009 6:30 pm Post subject: |
|
|
nordic bro,
I get /dev/sg devices for my normal hard drives and my DVD.
The hard drive /dev/sg devices are root root and the DVDs are root cdrom
$ ls -l /dev/sg?
crw-rw---- 1 root disk 21, 0 Apr 14 19:23 /dev/sg0
crw-rw---- 1 root disk 21, 1 Apr 14 19:23 /dev/sg1
crw-rw---- 1 root disk 21, 2 Apr 14 19:23 /dev/sg2
crw-rw---- 1 root cdrom 21, 3 Apr 14 19:23 /dev/sg3
crw-rw---- 1 root cdrom 21, 4 Apr 14 19:23 /dev/sg4
These are the character controlling devices, which you should not need to care about.
Your DVD block devices will be /dev/sr0, /dev/sr1 and so on _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
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
|
|