#289 Unfriendly behavior when uninstall can't delete

Fixed in Repo
open
nobody
None
5
2008-08-07
2008-07-24
No

When root does an install, it (correctly) creates a directory to which only root has write access. If non-root runs uninstall, it fails with a non-friendly message. It first prompts saying it will uninstall, you click yes, it displays the Uninstalling pane and the progress bar does its thing, then you get:

Error: Error in action ExecuteAction:...

Error in action ExecuteAction: Error in action UninstallSelectedFiles: couldn't open "/opt/carbonruntime/uninstall": permission denied
Error in action ExecuteAction: Error in action UninstallSelectedFiles: couldn't open "/opt/carbonruntime/uninstall": permission denied
while executing
"$obj execute"
(procedure "::InstallJammer::ExecuteActions" line 64)
invoked from within
"::InstallJammer::ExecuteActions $id -when $when"
(procedure "::InstallJammer::RaiseEventHandler" line 79)
invoked from within
"::InstallJammer::RaiseEventHandler .wizard"
(command bound to event)

You can click OK to dismiss this Application Error window, but you can't close the Uninstalling window. I'm using 1.2.7 on Linux.

A more user-friendly message describing the problem (permissions) would be nice.

Discussion

  • Damon Courtney

    Damon Courtney - 2008-07-24
    • milestone: --> 822553
     
  • Damon Courtney

    Damon Courtney - 2008-07-24

    Logged In: YES
    user_id=50387
    Originator: NO

    Do you think it might be better to put a flag in that requires root on the uninstall? You're correct that the error message needs to be nicer, but my thinking is that, in most cases, if you install as root, you're going to need root to uninstall.

     
  • Larry Engholm

    Larry Engholm - 2008-07-24

    Logged In: YES
    user_id=2105907
    Originator: YES

    Yes, I think if root installed, it would make sense to warn and discourage non-root from uninstalling. I think that would solve the most common problem.

    Though I think that's not a complete solution to the permissions problem, since I assume I'd get the same unfriendly error if one person installed and another person uninstalls.

    I know you think this isn't a normal occurrence (one person installing and another uninstalling) and maybe you're right, but I can imagine some sysadmins would be leery of running software they've never heard of as root, and would prefer to create a directory giving non-root write access. I'm planning to allow this, and I'm even displaying this in a pane:

    You don't have access to <%RuntimeDir%>, so you'll be prompted for the root password. Alternatively, you can exit this installer, create the directory and make it writable by you (e.g., mkdir <%RuntimeDir%>;chown <%Username%> <%RuntimeDir%>), and rerun this installer.

    By the way, this <%RuntimeDir%> isn't where this installer is installing, it's where the installer that I'm executing from this one will install.

    And I'm planning to complain (either with a bug or in the forum, I often don't know which is more appropriate) that the Execute External Program action with Execute as Root: Yes sets Status Virtual Text: 0 when the user clicks Ignore or Cancel when prompted for the root password. It seems like that should be considered an error.

     
  • Damon Courtney

    Damon Courtney - 2008-07-24

    Logged In: YES
    user_id=50387
    Originator: NO

    Anything you don't want me to lose track of should be posted here either as a bug or feature request. 0-]

    The permission problem can be cleared up as well, I was more asking as a general enhancement for a future version.

    The biggest problem with the execute as root option is that we're calling out to an external program to handle the actual execution of the command, so we don't have much control over what that program decides to report back to us. What OS / desktop environment are you using? Specifically, what prompts you for your root password? I need to look at the exit codes of the various graphical SU programs, but I'm sure I can find what I need from them.

     
  • Larry Engholm

    Larry Engholm - 2008-07-25

    Logged In: YES
    user_id=2105907
    Originator: YES

    I'm using Linux/KDE. The password prompt window's title bar says "Run as root - KDE su". And I observe that kdesu returns 0 when I cancel, unfortunately.

     
  • Damon Courtney

    Damon Courtney - 2008-08-07

    Logged In: YES
    user_id=50387
    Originator: NO

    A fix to at least get proper error messages has been committed to the 1.2 branch. If you get a chance, pull down the snapshot and give it a test.

     
  • Damon Courtney

    Damon Courtney - 2008-08-07
    • milestone: 822553 --> Fixed in Repo
     

Log in to post a comment.