From Bugzilla Helper: User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705) Description of problem: As reported for NULL in a sidenote, nautilus still will not actually eject a usb zip disk. IDE zips eject just fine. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. mount a usb zip with nautilus 2. right click on zip icon and move to eject 3. disk is unmounted but not ejected Additional info:
Presumably the kernel has a different interface for the eject here or something. If the command line "eject" command works we can probably copy what it does.
Nautilus just execs 'eject'.
But the eject command will eject this disk.
strange. Maybe it's ejecting the wrong device node or something. can you "strace -o exec.log -f -e execve nautilus" (after first killing nautilus). Just try to eject and then kill nautilus again. Then the exec.log file should contain what eject command was tried.
Ok, but when I do that all of a sudden I can't mount or umount/eject through nautilus (because you can't ptrace suid programs...?). So I log in as root - works fine even strace'ing it. But as a regular user it doesn't work and I can't strace it to see the return from the system calls.
So, when you strace it as root. Does it launch eject, and it fails to eject the floppy? If so, what is the argument list for the eject command?
No, as root it works fine straced or not. It's when it's run by a regular user that it fails.
very strange. BTW, my eject command is not setuid. Is yours really? what happens when you try to strace nautilus as a user?
no, but nautilus first execs `umount` then eject. mount & umount are setuid. I can only imagine that eject must call umount before trying to eject a disk.
the eject will certainly fail if the unmount failes (device busy or suchlike). I don't understand why it fails when you're not stracing it though, since it seems to launch the right things. It does manage to unmount it, you say so above, but the eject fails. Maybe the eject doesn't work if you do it immediately after the unmount. Maybe you have to wait a while. Can you test this is a shell first mount the floppy, then umount /dev/floppy; eject /dev/floppy and see if it works.
Bingo - eject will not eject the disk using the /dev/sda4 argument as a normal user. I get: $ eject /dev/sda4 eject: unable to eject. last error: Invalid argument In fact I can't exec eject at all right now (something here is screwy - I guess before I just remember being able to eject it when I was root) regardless of what argument I give it. Each time I do It umounts the disk but returns the error listed above. but eject works fine as root. Should eject be an suid program? BTW: stracing eject I see this line after its opendd a file descriptor on /dev/sda4 ioctl(3, FDEJECT, 0xbffff9e8) = -1 EINVAL Thoughts?
No idea. than, do you know?
very strange, i can eject my MO medium as normal user without this problem. Could you please try with eject -s -p if it works?
Samne result except that -p gives a "umount: only root can do that"
*** This bug has been marked as a duplicate of 101533 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.