Re: eject command fails on cdrom-SOLVED

2002-05-22 Thread Riaan Rottier
I found the problem...

My user did not belong to the group cdrom.  

Thank you fo all the advice

Riaan


On Wed, 2002-05-22 at 12:54, Riaan Rottier wrote:
 OK there is a link to hdc - 
 lrwxrwxrwx1 root root3 Feb 23 16:48 /dev/cdrom -hdc
 
 I can mount and unmount the cdrom without any problems, it is just the
 eject command that fails.
 
 Running strace eject (when running from /home/riaan) I get the following
 output:
 execve(/usr/bin/eject, [eject], [/* 21 vars */]) = 0
 uname({sys=Linux, node=werknet, ...}) = 0
 brk(0)  = 0x804c368
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
 -1, 0) = 0x40015000
 open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or
 directory) open(/etc/ld.so.cache, O_RDONLY)  = 3
 fstat64(3, {st_mode=S_IFREG|0644, st_size=43532, ...}) = 0
 old_mmap(NULL, 43532, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
 close(3)= 0
 open(/lib/libc.so.6, O_RDONLY)= 3
 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\230\327...,
 1024) = 1024
 fstat64(3, {st_mode=S_IFREG|0755, st_size=1170812, ...}) = 0
 old_mmap(NULL, 1187616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
 0x40021000
 mprotect(0x40139000, 40736, PROT_NONE)  = 0
 old_mmap(0x40139000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
 3, 0x117000) = 0x40139000
 old_mmap(0x4013f000, 16160, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013f000
 close(3)= 0
 munmap(0x40016000, 43532)   = 0
 brk(0)  = 0x804c368
 brk(0x804c388)  = 0x804c388
 brk(0x804d000)  = 0x804d000
 open(/dev/cdrom, O_RDONLY|O_NONBLOCK) = -1 EACCES (Permission denied)
 open(/mnt/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
 directory)
 open(/dev/cdroms/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
 or directory)
 open(/dev/cdroms/cdrom0, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such
 file or directory)
 open(/dev/rdsk/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
 or directory)
 open(/dev/dsk/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
 directory)
 open(./cdrom, O_RDONLY|O_NONBLOCK)= -1 ENOENT (No such file or
 directory)
 write(2, eject: unable to find or open de..., 50eject: unable to find
 or open
 device for: `cdrom'
 ) = 50
 _exit(1)= ?
 
 Meaning nothing to me...
 
 When running the same strace eject command from / I get:
 execve(/usr/bin/eject, [eject], [/* 21 vars */]) = 0
 uname({sys=Linux, node=werknet, ...}) = 0
 brk(0)  = 0x804c368
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
 -1, 0) = 0x40015000
 open(/etc/ld.so.preload, O_RDONLY)= -1 ENOENT (No such file or
 directory) open(/etc/ld.so.cache, O_RDONLY)  = 3
 fstat64(3, {st_mode=S_IFREG|0644, st_size=43532, ...}) = 0
 old_mmap(NULL, 43532, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40016000
 close(3)= 0
 open(/lib/libc.so.6, O_RDONLY)= 3
 read(3, \177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\230\327...,
 1024) = 1024
 fstat64(3, {st_mode=S_IFREG|0755, st_size=1170812, ...}) = 0
 old_mmap(NULL, 1187616, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
 0x40021000
 mprotect(0x40139000, 40736, PROT_NONE)  = 0
 old_mmap(0x40139000, 24576, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
 3, 0x117000) = 0x40139000
 old_mmap(0x4013f000, 16160, PROT_READ|PROT_WRITE,
 MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x4013f000
 close(3)= 0
 munmap(0x40016000, 43532)   = 0
 brk(0)  = 0x804c368
 brk(0x804c388)  = 0x804c388
 brk(0x804d000)  = 0x804d000
 open(/dev/cdrom, O_RDONLY|O_NONBLOCK) = -1 EACCES (Permission denied)
 open(/mnt/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
 directory) open(/dev/cdroms/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT
 (No such file or directory)
 open(/dev/cdroms/cdrom0, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such
 file or directory)
 open(/dev/rdsk/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file
 or directory)
 open(/dev/dsk/cdrom, O_RDONLY|O_NONBLOCK) = -1 ENOENT (No such file or
 directory)
 open(./cdrom, O_RDONLY|O_NONBLOCK)= 3
 close(3)= 0
 readlink(./cdrom, 0xb67c, 1024)   = -1 EINVAL (Invalid argument)
 open(/etc/mtab, O_RDONLY) = 3
 fstat64(3, {st_mode=S_IFREG|0644, st_size=276, ...}) = 0
 old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
 -1, 0) = 0x40016000
 read(3, /dev/hda4 / ext2 rw,errors=remou..., 4096) = 276
 read(3, , 4096)   = 0
 close(3)= 0
 munmap(0x40016000, 4096)= 0
 open(/etc/fstab, O_RDONLY)= 3
 fstat64(3, {st_mode=S_IFREG|0644, 

Re: eject command fails on cdrom-SOLVED

2002-05-22 Thread Vincent Lefevre
On Wed, May 22, 2002 at 13:19:58 +0200, Riaan Rottier wrote:
 I found the problem...
 
 My user did not belong to the group cdrom.  

On my machine (Titanium), /dev/hdc (corresponding to the cdrom) has
the group disk, not cdrom. Is there something wrong?

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/ - 100%
validated (X)HTML - Acorn Risc PC, Yellow Pig 17, Championnat International
des Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Re: eject command fails on cdrom-SOLVED

2002-05-22 Thread Robert_L
On Wednesday 22 May 09:53, Vincent Lefevre wrote:
 On Wed, May 22, 2002 at 13:19:58 +0200, Riaan Rottier wrote:
  I found the problem...
 
  My user did not belong to the group cdrom.

 On my machine (Titanium), /dev/hdc (corresponding to the cdrom) has
 the group disk, not cdrom. Is there something wrong?

I think the point here is that the user mounting/umounting needs to be a 
member of the group that owns the device file.  

 I don't know the arguments for and against that group being cdrom or disk. 
On my machine, disk group owns ram and loop and cdrom group owns hdc which 
is the cdrom device (on my machine), and owns scd0 which is my cd writer.

all the best,
Robert_L


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]