Bug 12133 - Build 124/5 regular user can no longer eject removable media.
: Build 124/5 regular user can no longer eject removable media.
Status: CLOSED FIXED
Product: opensolaris
hardware
: unspecified
: i86pc/i386 OpenSolaris
: P2 critical (vote)
: ---
Assigned To: Watcher for OpenSolaris hardware bugs
:
:
:
:
:
: 8314
  Show dependency treegraph
 
Reported: 2009-10-21 00:58 UTC by Alan Pae
Modified: 2009-11-15 22:40 UTC (History)
4 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Alan Pae 2009-10-21 00:58:10 UTC
This started with 124 and continues on build 125.

If you insert optical or usb media and then try to right click on them and
select either eject or unmount it no longer works.

The workaround is to either su to root or use pfexec to eject the media.

pfexec eject for optical

or 

su; eject rmdisk for usb devices.

Please return it to the old behavior.

On dvd insertion I get a message that the media cannot be mounted but it gets
mounted anyways.

Oct 20 17:56:18 r51.ilkda.com dbus-daemon[402]: [ID 366805 auth.notice]
Rejected send message, 2 matched rules; type="method_call", sender=":1.21"
(uid=101 pid=1201 comm="") interface="org.freedesktop.Hal.Device.Volume"
member="Mount" error name="(unset)" requested_reply=0
destination="org.freedesktop.Hal" (uid=0 pid=420 comm=""))

Right click, eject says that the media cannot be unmounted and it stays in the
drive.

Oct 20 17:57:07 r51.ilkda.com dbus-daemon[402]: [ID 366805 auth.notice]
Rejected send message, 2 matched rules; type="method_call", sender=":1.22"
(uid=101 pid=1207 comm="") interface="org.freedesktop.Hal.Device.Volume"
member="Unmount" error name="(unset)" requested_reply=0
destination="org.freedesktop.Hal" (uid=0 pid=420 comm=""))

alan
Comment 1 Jürgen Keil 2009-10-22 18:04:02 UTC
Hmm, on my SX:CE build 124 box (full install, no upgrade)
mount, unmount and eject works just fine for a non root user...
Comment 2 Alan Pae 2009-10-22 19:08:41 UTC
(In reply to comment #1)
> Hmm, on my SX:CE build 124 box (full install, no upgrade)
> mount, unmount and eject works just fine for a non root user...

Ok, try it again on OpenSolaris.  I've noticed that the two act differently
sometimes.

thanks,
alan
Comment 3 Jürgen Keil 2009-10-22 22:45:38 UTC
On the same notebook running opensolaris 2010.20 b125 the problem 
is reproducible.
Comment 4 Alan Pae 2009-10-22 23:31:39 UTC
(In reply to comment #3)
> On the same notebook running opensolaris 2010.20 b125 the problem 
> is reproducible.

Thank you. :-)

alan
Comment 5 Alan Burlison 2009-10-22 23:32:40 UTC
Also broken for me:

grinah$ eject
eject of cdrom /dev/dsk/c4t0d0s2 failed: Rejected send message, 2 matched
rules; type="method_call", sender=":1.27" (uid=37845 pid=2893 comm="")
interface="org.freedesktop.Hal.Device.Storage" member="Eject" error
name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0
pid=540 comm=""))

grinah$ eject 1GBFLASH
unmount of 1GBFLASH /dev/dsk/c5t0d0p0 failed: Rejected send message, 2 matched
rules; type="method_call", sender=":1.28" (uid=37845 pid=2899 comm="")
interface="org.freedesktop.Hal.Device.Volume" member="Unmount" error
name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0
pid=540 comm=""))
Comment 6 Alan Pae 2009-10-24 00:20:27 UTC
I finally figured out a better workaround.

Use rmformat to get the /dev....

Then fdisk /dev....

Delete all partitions, and create one Solaris2 partition.

Then zpool create pool_name /dev....

Then start writing to it. :-)

Then zpool export pool_name.

Works wonderfully well. <vbg>
Comment 7 Jürgen Keil 2009-10-24 11:11:31 UTC
(In reply to comment #6)
> I finally figured out a better workaround.

Did we already had a workaround?


> Use rmformat to get the /dev....
> 
> Then fdisk /dev....
> 
> Delete all partitions, and create one Solaris2 partition.
> 
> Then zpool create pool_name /dev....
> 
> Then start writing to it. :-)
> 
> Then zpool export pool_name.
> 
> Works wonderfully well. <vbg>


Hmm - and that helps with ejecting optical media?
Comment 8 Jürgen Keil 2009-10-24 13:19:21 UTC
(In reply to comment #0)
> This started with 124 and continues on build 125.
> 
> If you insert optical or usb media and then try to right click on them and
> select either eject or unmount it no longer works.
> 
> The workaround is to either su to root or use pfexec to eject the media.
> 
> pfexec eject for optical

Seems that ownership of the /dev/console device has changed between 
opensolaris b123 and b125 when a regular user is logged in.

In b123 the /dev/console file was owned by the non-root user.
In b125 root owns /dev/console.

After changing the owner of /dev/console to the non-root user
that is running the gui session, eject command starts to work.
Comment 9 Jürgen Keil 2009-10-24 13:38:45 UTC
Bug 6885612... 

    "Console user" profile implementation need to be updated after Virtual
Console integration
    http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6885612

... contains a hint that due to the virtual consoles feature the login
user now owns /dev/vt/2 instead of /dev/console.
Comment 10 Alan Pae 2009-10-24 19:11:57 UTC
(In reply to comment #9)
> Bug 6885612... 
> 
>     "Console user" profile implementation need to be updated after Virtual
> Console integration
>     http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6885612
> 
> ... contains a hint that due to the virtual consoles feature the login
> user now owns /dev/vt/2 instead of /dev/console.

Absolutely not.  I'll try what you posted because I still need to have at least
one FAT32 USB device.  But!!! zfs on a usb key is really cool.  The downside is
that it isn't automatically mounted or unmounted.  zpool import, zpool export. 
I would imagine that compression would work as well.

thanks for the console tip,
alan
Comment 11 Alan Pae 2009-10-24 19:24:25 UTC
(In reply to comment #8)
> (In reply to comment #0)
> > This started with 124 and continues on build 125.
> > 
> > If you insert optical or usb media and then try to right click on them and
> > select either eject or unmount it no longer works.
> > 
> > The workaround is to either su to root or use pfexec to eject the media.
> > 
> > pfexec eject for optical
> 
> Seems that ownership of the /dev/console device has changed between 
> opensolaris b123 and b125 when a regular user is logged in.
> 
> In b123 the /dev/console file was owned by the non-root user.
> In b125 root owns /dev/console.
> 
> After changing the owner of /dev/console to the non-root user
> that is running the gui session, eject command starts to work.

Ok, so a chown from root to user and I can once again eject FAT32 usb drives
and optical media.  

I'll assume that the other bug report will be the permanent fix so is it ok to
close this one?  If not, is chmod better than chown?

thanks,
alan
Comment 12 Jürgen Keil 2009-10-24 21:34:13 UTC
(In reply to comment #11)

> Ok, so a chown from root to user and I can once again eject FAT32 usb drives
> and optical media.  
> 
> I'll assume that the other bug report will be the permanent fix so is it ok to
> close this one? 

I'm not sure if 6885612 will fix the same issue.

But it does explain what has changed in b124.



> If not, is chmod better than chown?

I think chown is needed.
Comment 13 Alan Burlison 2009-10-25 09:32:41 UTC
This also breaks VirtualBox, which can no longer access the DVD drive.
Comment 14 Jürgen Keil 2009-10-25 09:50:23 UTC
(In reply to comment #12)
> (In reply to comment #11)
> 
> > I'll assume that the other bug report will be the permanent fix so is it ok to
> > close this one? 
> 
> I'm not sure if 6885612 will fix the same issue.

But it contains links to quite a few bugs that show breakage in other 
areas (xterm -C, nwam, printer queues, ...) that are caused by /dev/console
being owned by root.

Looking at one of the bugs, 6886849
"login user does not own /dev/console when login in gdm 2.20.x"
http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6886849
seems to contain a hint that something was changed in b126 gnome
session to work around the /dev/console owner problems...
Comment 15 Jürgen Keil 2009-10-25 09:59:28 UTC
(In reply to comment #13)
> This also breaks VirtualBox, which can no longer access the DVD drive.

I don't think so, because on my b124 SX:CE box it do own the 
/dev/console device when I login as a regular user, but
VirtualBox 3.0.8 isn't able to access the dvd drive hardware.

Which version of VirtualBox are you running ?


I think this is a bug in the OpenSolaris VirtualBox 3.0.8
release:

    http://forums.virtualbox.org/viewtopic.php?f=11&t=23392
Comment 16 Alan Burlison 2009-10-25 10:08:44 UTC
> Which version of VirtualBox are you running ?

3.0.8

> I think this is a bug in the OpenSolaris VirtualBox 3.0.8
> release:
> 
>     http://forums.virtualbox.org/viewtopic.php?f=11&t=23392

I think you are probably right, although the symptoms are very similar - thanks
for the reference Jürgen :-)
Comment 17 David Comay 2009-10-26 20:54:26 UTC
Jürgen, I think the root cause of this *is* 6885612 especially after some
discussions earlier with Gary Winiger.

In any case, marking this as a potential blocker for the next release.
Comment 18 Alan Pae 2009-10-27 02:16:28 UTC
> After changing the owner of /dev/console to the non-root user
> that is running the gui session, eject command starts to work.

Since I use a laptop this was fun.  Changed the owner to user:group and then
powered down.  The next day after bootup the owner had reverted back to
root:tty.

alan
Comment 19 Alan Pae 2009-10-27 02:16:57 UTC
> After changing the owner of /dev/console to the non-root user
> that is running the gui session, eject command starts to work.

Since I use a laptop this was fun.  Changed the owner to user:group and then
powered down.  The next day after bootup the owner had reverted back to
root:tty.

alan
Comment 20 Alan Pae 2009-10-30 02:43:58 UTC
Fixed in build 126.

Many thanks,
alan
Comment 21 Jürgen Keil 2009-10-31 16:35:01 UTC
(In reply to comment #16)

> > I think this is a bug in the OpenSolaris VirtualBox 3.0.8
> > release:
> > 
> >     http://forums.virtualbox.org/viewtopic.php?f=11&t=23392
> 
> I think you are probably right, although the symptoms are very similar - thanks
> for the reference Jürgen :-)

VirtualBox 3.0.10 is released and fixes this problem.
Comment 22 Jürgen Keil 2009-11-10 22:46:42 UTC
*** Bug 12566 has been marked as a duplicate of this bug. ***