Jump to content

Permission denied running .jar


Guest Alden
 Share

Recommended Posts

I'm trying to run jgnash_bin.jar, as root it works. When I try to run as a user this is the error:

 

 

[alden@localhost jnash]$ java -jar -esa jgnash_bin.jar

Exception in thread "main" java.util.zip.ZipException: Permission denied

at java.util.zip.ZipFile.open(Native Method)

at java.util.zip.ZipFile.<init>(ZipFile.java:112)

at java.util.jar.JarFile.<init>(JarFile.java:117)

at java.util.jar.JarFile.<init>(JarFile.java:55)

[alden@localhost jnash]$

 

I just don't know enough Linux yet to find the problem. Any help is appreciated. Thanks

 

Alden

Link to comment
Share on other sites

Hi, I just got jGnash running yesterday, maybe I can help.

Try the command without -esa

See if that does anything.

I don't use that part, and it works (as user)

Also make sure as a user, you can execute it.

Right-click on the jgnash_bin.jar (is it in your /home directory?) select properties, then permissions, and check the "Exec" box by user.

Let me know if it helps.

By the way, the author seems to be a really good guy, and he will answer email questions.

Link to comment
Share on other sites

I'm using this as root and it works: ./java -jar /usr/jgnash/jgnash_bin.jar

 

When I try that as a user I get the "permission denied"

 

May I ask. How are you starting jgnash? I haven't tried the author yet.

 

Thanks

 

Alden

Link to comment
Share on other sites

First, jgnash_bin.jar is in my /home directory, not in /usr

I don't know why you have it in your /usr directory, but can you put it in your /home directory instead?

If it is your /usr directory, then you need to set the permissions on it so that you can execute it as a user.

There is no need to run this as root.

Like I said, it is in my /home directory, and to run it I do

java -jar jgnash_bin.jar

 

That's it. Good Luck.

Link to comment
Share on other sites

83mercedes,

 

Thanks for the assit, I had to download the .jar file again into my /home directory. It then worked just fine. I had copied it into /home and that didn't work.

 

Now I presume that I'm the only user that can open this file in it's present location. There must be a way to put it in a common folder and change the permissions. I thought the proper permissions were checked but it never would work.

 

Alden

Link to comment
Share on other sites

Glad to help, and glad you got it.

Maybe ask around this forum for more info on the permissions thing, since I am relatively new to Linux, I am not that up on that stuff, particularly since I am the only one who uses my computer, and have never had to set one up for multiple users.

It is something I will definately want to learn about, but now it's not a priority for me.

Take care and Welcome!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...