[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: why "permission error" if i'm not trying to change alternatives?

On 14Jul2009 04:55, Robert P. J. Day <rpjday crashcourse ca> wrote:
|   just checking the java setup on my f11 system so -- as a non-root
| user -- i run the following and get:
| $ /usr/sbin/alternatives --config java
| There are 2 programs which provide 'java'.
|   Selection    Command
| -----------------------------------------------
| *+ 1           /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
|    2           /usr/lib/jvm/jre-1.5.0-gcj/bin/java
| Enter to keep the current selection[+], or type selection number: <ENTER>
| failed to create /var/lib/alternatives/java.new: Permission denied
| $
|   i had no intention of changing the java setup, which is why i
| pressed <ENTER>, but i got a "Permission denied" error anyway.  why?
| if i choose to *not* modify my alternatives setup, what's happening
| underneath that i don't have permission to do?  that just seems odd.

It looks to me like it always applies your choice, even if the choice is
the same as the current setting. And thus the permission issue, because
it's trying to do stuff anyway.

There's a (weak) argument for working this way, in that it lets you
"recover" a mangled setup if you have one. But personally I prefer to
require a special flag for such operation (eg --force).

Cameron Simpson <cs zip com au> DoD#743

If it can't be turned off, it's not a feature. - Karl Heuer

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]