When I try tro unmount Ipod nano volume in Nautilus, I get the following error: /usr/bin/eject: unable to eject, last error: Invalid argument. I am using dbus, hal, and ivman and have added myself to the disk group. I can fix the problem by making /usr/bin/eject a suid binary. Portage 2.1_pre1 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.5-r3, 2.6.14.4 i686) ================================================================= System uname: 2.6.14.4 i686 Intel(R) Celeron(R) CPU 2.80GHz Gentoo Base System version 1.12.0_pre12 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -g" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -g" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac acl acpi adns alsa apm audiofile avi berkdb bitmap-fonts bzip2 cdr crypt cscope cups curl dbus eds emboss encode esd exif expat fam ffmpeg flac foomaticdb gd gdbm gif glut gnome gphoto2 gpm gstreamer gtk gtk2 guile hal idn imagemagick imlib ipod ipv6 jack java jpeg junit lcms libg++ libwww mad mikmod mmx mng mono motif mozilla mp3 mpeg ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline ruby sdl slang spell sqlite sse sse2 ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs xine xml xml2 xmms xv xvid zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
are you in the plugdev group?
> are you in the plugdev group? Yes, I am.
> > are you in the plugdev group? > > Yes, I am. While doing testing for another bug [1], I noticed that I cannot unmount Ipod nano device when logged in as myself if I plug in the device when X is in the GDM login screen. So the SUID bit doesn't completely fix the problem. https://bugs.gentoo.org/show_bug.cgi?id=116729
(Please note the I upgraded my kernel and portage so I have included emerge info here again.) Portage 2.1_pre2 (default-linux/x86/2005.0, gcc-3.3.4, glibc-2.3.5-r3, 2.6.15-rc7 i686) ================================================================= System uname: 2.6.15-rc7 i686 Intel(R) Celeron(R) CPU 2.80GHz Gentoo Base System version 1.12.0_pre12 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.17 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1-r1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r3 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -g" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -g" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac acl acpi adns alsa apm audiofile avi berkdb bitmap-fonts bzip2 cdr crypt cscope cups curl dbus eds emboss encode esd exif expat fam ffmpeg flac foomaticdb gd gdbm gif glut gnome gphoto2 gpm gstreamer gtk gtk2 guile hal idn imagemagick imlib ipod ipv6 jack java jpeg junit lcms libg++ libwww mad mikmod mmx mng mono motif mozilla mp3 mpeg ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline ruby sdl slang spell sqlite sse sse2 ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vorbis win32codecs xine xml xml2 xmms xv xvid zlib elibc_glibc kernel_linux userland_GNU" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
I haven't tested this patch [1] yet but it should fix the error. Relevant discussion is here [2]. I'll report once I have the chance to test it. 1. http://bugzilla.ubuntu.com/attachment.cgi?id=5415 2. http://marc.theaimsgroup.com/?l=linux-kernel&m=113508268711624&w=2
(In reply to comment #5) > I haven't tested this patch [1] yet but it should fix the error. Relevant > discussion is here [2]. I'll report once I have the chance to test it. > > 1. http://bugzilla.ubuntu.com/attachment.cgi?id=5415 > 2. http://marc.theaimsgroup.com/?l=linux-kernel&m=113508268711624&w=2 This patch fixes the permission problem so I don't have the SUID /usr/bin/eject. Please consider applying.
Is this bug still reproducible?
> Is this bug still reproducible? Yes it is. I have a slightly different configuration now. No ivman, just gnome-volume-manager. I have downgraded everything to Gentoo stable now (I used to be ~x86). I still need to chmod u+s /usr/bin/eject for ipod unmount to work properly. raquel penberg # emerge info Portage 2.0.54 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 2.6.15 i686) ================================================================= System uname: 2.6.15 i686 Intel(R) Celeron(R) CPU 2.80GHz Gentoo Base System version 1.6.14 dev-lang/python: 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O2 -march=pentium3 -g" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O2 -march=pentium3 -g" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig distlocks nostrip sandbox sfperms strict" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LANG="en_US.utf8" LC_ALL="en_US.utf8" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 X aac acl acpi adns alsa apm audiofile avi berkdb bitmap-fonts bzip2 cdr crypt cscope cups curl dbus eds emboss encode esd exif expat fam ffmpeg flac foomaticdb gd gdbm gif glut gmp gnome gphoto2 gpm gstreamer gtk gtk2 gtkhtml guile hal idn imagemagick imlib ipod ipv6 jack java jpeg junit lcms libg++ libwww mad mikmod mmx mng mono motif mozilla mp3 mpeg ncurses nls nptl ogg oggvorbis opengl oss pam pcre pdflib perl png python qt quicktime readline ruby sdl slang spell sqlite sse sse2 ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vlc vorbis win32codecs xine xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LDFLAGS, LINGUAS, MAKEOPTS
After getting my iPod and doing some research, this issue is now in two distinct parts. 1) eject-2.1.4 is required 2) a patch to block/scsi_ioctl.c in linux kernel is required With patch applied, eject works with my iPod Nano without having to be suid root. As such, it's not GNOME bug at all. Re-assigning to kernel team as eject has already been fixed in portage.
Created attachment 85271 [details, diff] Patch scsi block for 2.6.16 Patch ripped from a Ubuntu kernel. Fixes above issue, request inclusion in gentoo-sources.
Please get that included upstream, and/or fix eject. Ejecting works as a user over SCSI transport, as long as the device is opened for read+write.
(In reply to comment #11) > Please get that included upstream, and/or fix eject. Ejecting works as a user > over SCSI transport, as long as the device is opened for read+write. eject-2.1.4 is already fixed. http://www.ussg.iu.edu/hypermail/linux/kernel/0512.2/0808.html Note the comment at the bottom - I'll quote here. >bcollins@colorless:~$ id -a > uid=1000(bcollins) gid=1000(bcollins) > groups=4(adm),20(dialout),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),104(lpadmin),105(scanner),106(admin),1000(bcollins) > bcollins@colorless:~$ ls -l /dev/hdc > brw-rw---- 1 root plugdev 22, 0 Dec 19 2005 /dev/hdc > bcollins@colorless:~$ eject -s /dev/hdc > eject: unable to eject, last error: Operation not permitted > bcollins@colorless:~$ eject -r /dev/hdc > bcollins@colorless:~$ > > Write permissions is not enough. What is the proper action for getting this included upstream if you won't put it in gentoo-sources?
That's an eject bug because it opens for read-only. From "strace eject -s /dev/sdb1": open("/dev/sdb1", O_RDONLY|O_NONBLOCK) = 3 I am using eject v2.1.4
You're right, sorry.
I'll take this then and patch eject as it looks like the kernel is now fine.
Fixed in eject-2.1.4-r1
*** Bug 135229 has been marked as a duplicate of this bug. ***