Author |
Message |
cmaines
|
Posted: Sun Nov 06, 2005 3:44 pm |
|
Joined: Sun Oct 16, 2005 9:24 pm
Posts: 61
|
Although the mythwebburn script seems pretty near perfect in R5A22, it stops when it gets to the point where it should burn my DVD-R. I get the following error:
Burning DVD-R image
Sent UDP/XML packet to IP 255.255.255.255 and port: 6948
 unable to open64("/dev/dvd",O_RDONLY): Permission denied
***********************************
MythTV BurnDVD stopped due to error
***********************************
Sent UDP/XML packet to IP 255.255.255.255 and port: 6948
I can easily write a DVD-R from an xterm window using the growisofs command, but I'd rather it all happen within the mythwebburn script. I'm pretty sure my DVD writer is actually mounted as /dev/cdrom and not as /dev/dvd. What would be the best course of action: relabel my DVD writer as /dev/dvd and risk things elsewhere not working properly, or alter the /dev/dvd line within the mythwebburn script. If the latter, where do I find it - I've looked in all the .php files and .conf files I can find that are related to DVD burning.
Thanks.
|
|
Top |
|
 |
Liv2Cod
|
Posted: Sun Nov 06, 2005 6:49 pm |
|
Joined: Fri May 21, 2004 11:55 pm
Posts: 1206
Location:
Silicon Valley, CA
|
Maybe add another device for /dev/dvd. I'm pretty sure it's OK to have the same name for two different devices.
Here are the relevant entries in my box:
Code: root@mythtv:~# ll /dev/dvd /dev/cdrom lrwxrwxrwx 1 root cdrom 8 Aug 6 22:31 /dev/cdrom -> /dev/hdb lrwxrwxrwx 1 root cdrom 8 Aug 6 22:31 /dev/dvd -> /dev/hdb
_________________ Do you code to live, or live to code? Search LinHES forum through Google
|
|
Top |
|
 |
cmaines
|
Posted: Sun Nov 13, 2005 1:26 pm |
|
Joined: Sun Oct 16, 2005 9:24 pm
Posts: 61
|
My box also has very similar entries, ie. - both /dev/cdrom and /dev/dvd are linked (if that's the correct term" to /dev/hda - so I don't think that's the problem. I put a blank DVD-R in the drive and tried
Code: # mount /dev/hdc /mnt/dvd
but it said it was read-only and couldn't mount the drive. Are there other "devices" that are defined as DVD writeable that would allow me to mount the blank DVD-R?
|
|
Top |
|
 |
tjc
|
Posted: Sun Nov 13, 2005 4:35 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
Liv2Cod wrote: Maybe add another device for /dev/dvd. I'm pretty sure it's OK to have the same name for two different devices.
Those are symbolic links and you can have as many of them as you want to the same file system object. For example:
Code: root@black2:~# ls -al /dev/cdrom /dev/dvd /dev/hdc lrwxrwxrwx 1 root cdrom 8 Nov 6 18:42 /dev/cdrom -> /dev/hdc lrwxrwxrwx 1 root cdrom 8 Nov 6 18:42 /dev/dvd -> /dev/hdc brw-rw---- 1 root cdrom 22, 0 May 7 2004 /dev/hdc
Here you see two symbolic links cdrom and dvd (notice the ' l' in the first colum) with the same destination, /dev/hdc. The ' b' in the first column for that tells you that it's a "block device" - i.e. a disk or tape of some kind.
|
|
Top |
|
 |
tjc
|
Posted: Sun Nov 13, 2005 4:41 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
cmaines wrote: My box also has very similar entries, ie. - both /dev/cdrom and /dev/dvd are linked (if that's the correct term" to /dev/hda
OK, that sounds screwy, since /dev/hda (the primary master IDE drive) is normally your hard disk. Do this:
Code: grep [hs]d[abcdefgh][:1234567] /var/log/dmesg and post the results here.
|
|
Top |
|
 |
cmaines
|
Posted: Sun Nov 13, 2005 5:45 pm |
|
Joined: Sun Oct 16, 2005 9:24 pm
Posts: 61
|
tjc:
I have a SATA drive instead of an IDE drive. Consequently my hard drive is actually /dev/sda.
Here are the results of the grep:
Code: ide0: BM-DMA at 0x4000-0x4007, BIOS settings: hda:DMA, hdb:pio ide1: BM-DMA at 0x4008-0x400f, BIOS settings: hdc:pio, hdd:pio hda: _NEC DVD_RW ND-3540A, ATAPI CD/DVD-ROM drive hda: ATAPI 48X DVD-ROM DVD-R CD-R/RW drive, 2048kB Cache, UDMA(33) SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB) SCSI device sda: drive cache: write back SCSI device sda: 490234752 512-byte hdwr sectors (251000 MB) SCSI device sda: drive cache: write back sda: sda1 sda2 < sda5 sda6 sda7 > Adding 2931820k swap on /dev/sda5. Priority:-1 extents:1 EXT3 FS on sda1, internal journal EXT3 FS on sda7, internal journal
|
|
Top |
|
 |
tjc
|
Posted: Sun Nov 13, 2005 9:37 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
OK, I kind of figured that was one of the possibilities. What does this show?
Code: ls -al /dev/cdrom /dev/dvd /dev/hda grep cdrom /etc/group
|
|
Top |
|
 |
TB12
|
Posted: Sat Nov 26, 2005 1:56 pm |
|
Joined: Tue Apr 12, 2005 10:15 am
Posts: 30
|
I am getting the same error when I try Mythwebburn. I just installed R5a26. All else seems to work.
mythtv@mythtv:~$ ls -al /dev/cdrom /dev/dvd /dev/hda
lrwxrwxrwx 1 root cdrom 8 Nov 25 20:20 /dev/cdrom -> /dev/hdc
lrwxrwxrwx 1 root cdrom 8 Nov 25 20:20 /dev/dvd -> /dev/hdc
brw-rw---- 1 root disk 3, 0 May 7 2004 /dev/hda
mythtv@mythtv:~$ grep cdrom /etc/group
cdrom:*:24:mythtv,tb12
mythtv@mythtv:~$
mythtv@mythtv:~$ grep [hs]d[abcdefgh][:1234567] /var/log/dmesg
ide0: BM-DMA at 0xfff0-0xfff7, BIOS settings: hda:DMA, hdb:pio
ide1: BM-DMA at 0xfff8-0xffff, BIOS settings: hdc:DMA, hdd:pio
hda: Maxtor 6L200R0, ATA DISK drive
hdc: MATSHITADVD-RAM SW-9585, ATAPI CD/DVD-ROM drive
hda: max request size: 1024KiB
hda: 398297088 sectors (203928 MB) w/16384KiB Cache, CHS=24792/255/63, UDMA(66)
hda: cache flushes supported
hda: hda1 hda2 hda3 hda4
hdc: ATAPI 40X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(66)
Adding 996020k swap on /dev/hda2. Priority:-1 extents:1
EXT3 FS on hda1, internal journal
EXT3 FS on hda4, internal journal
Any ideas??
|
|
Top |
|
 |
nigelpearson
|
Posted: Sat Nov 26, 2005 6:11 pm |
|
Joined: Wed Mar 03, 2004 7:43 pm
Posts: 748
Location:
Sydney, Australia
|
TB, if your CD/DVD is /dev/hda, then having /dev/cdrom and /dev/dvd point to /dev/hdc won't do much. Try this as root:
cd /dev
rm cdrom dvd
ln -s /dev/hdc cdrom
ln -s /dev/hdc dvd
chmod 666 hdc
and then try to burn the disk again (the following command will be much faster then re-running the burn scripts)
growisofs -Z /dev/dvd -dvd-video -V "MythTV BurnDVD" /myth/mythburn/DVD
_________________ | Nigel Pearson, nigel.pearson.au@gmail.com| "Things you own end up owning you" - Tyler, Fight Club
|
|
Top |
|
 |
TB12
|
Posted: Sat Nov 26, 2005 9:39 pm |
|
Joined: Tue Apr 12, 2005 10:15 am
Posts: 30
|
It worked!!
Thanks, Nigel.
Knoppmyth...so butter.
|
|
Top |
|
 |
intricateenigma
|
Posted: Wed Nov 30, 2005 7:56 pm |
|
Joined: Tue Oct 25, 2005 9:23 pm
Posts: 3
|
For anyone else out there facing this problem, you might also consider adding the user that will be running the script to the cdrom group.
For me, /dev/dvd links to /dev/hdc. If I run "ls -a /dev/hdc" I get:
Code: brw-rw---- 1 root cdrom 22, 0 May 7 2004 /dev/hdc In a knoppmyth install (I have R5A16) mythtv is in the cdrom group by default, however, the web server runs as www-data. To allow burning dvd's from the webserver su into root or use sudo and run the following command: Code: usermod -Gcdrom www-data This will work for any user you want to have cdrom rw access by substituting the username in for "www-data". This is a little more secure as it still restricts who can write to the cdrom drive. To change your rwx permissions to match mine, as root you would run: Code: chmod 660 /dev/hdc
|
|
Top |
|
 |
tjc
|
Posted: Wed Nov 30, 2005 10:31 pm |
|
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location:
Arlington, MA
|
This is definitely the more correct solution.
|
|
Top |
|
 |
mgpaulus
|
Posted: Thu Feb 09, 2006 1:18 pm |
|
Joined: Fri Dec 09, 2005 12:10 pm
Posts: 5
|
intricateenigma wrote: For anyone else out there facing this problem, you might also consider adding the user that will be running the script to the cdrom group. For me, /dev/dvd links to /dev/hdc. If I run "ls -a /dev/hdc" I get: Code: brw-rw---- 1 root cdrom 22, 0 May 7 2004 /dev/hdc In a knoppmyth install (I have R5A16) mythtv is in the cdrom group by default, however, the web server runs as www-data. To allow burning dvd's from the webserver su into root or use sudo and run the following command: Code: usermod -Gcdrom www-data This will work for any user you want to have cdrom rw access by substituting the username in for "www-data". This is a little more secure as it still restricts who can write to the cdrom drive. To change your rwx permissions to match mine, as root you would run: Code: chmod 660 /dev/hdc
This doesn't seem to work in my instance. I have added www-data to the cdrom group, and if I were to 'su - www-data' and then do an 'id', I get:
uid=33(www-data) gid=33(www-data) groups=24(cdrom),33(www-data)
However, when I put an 'id' command in mythtvburn.sh, this is what is output:
uid=33(www-data) gid=33(www-data) groups=33(www-data)
So, whereever mythburn is being invoked, it is not picking up the cdrom group from /etc/groups, and therefore, I still get "Permission denied".
|
|
Top |
|
 |
mgpaulus
|
Posted: Thu Feb 09, 2006 1:51 pm |
|
Joined: Fri Dec 09, 2005 12:10 pm
Posts: 5
|
Nevermind the above. I stopped and restarted my apache server, and now the www-data user has cdrom in its group:
uid=33(www-data) gid=33(www-data) groups=24(cdrom),33(www-data)
|
|
Top |
|
 |