LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 05-06-2011, 09:36 AM   #1
bibiki
LQ Newbie
 
Registered: Jul 2010
Posts: 19

Rep: Reputation: 0
permission's issue


hey there,

I have been using Ubuntu for a year now. I am all happy with it, but Ubuntu 11.04 messed some things.

I am a student of Java, and use it every day. whereas it worked fine before, since my recent upgrade, compiling files works just fine, but running them won't work fine. instead of running java files with just a 'java FileName', now I need to add a sudo as follows: 'sudo java FileName'. is there any way I can make sure my computer runs java files without requesting the sudo command? how do I go about that?
 
Old 05-06-2011, 11:10 AM   #2
jason_not
Member
 
Registered: Aug 2010
Location: Beaverton, Oregon, USA
Distribution: Pfsense, Ubuntu, Centos, Fedora, Redhat, Scientfic, MacOS
Posts: 76

Rep: Reputation: 19
Hi,

Look at the permissions of the java binary, and make sure the read and execute bits are set. However, you will need to trace a couple of symlinks.

In my case I do the following:
Quote:
ls -l `which java`
lrwxrwxrwx 1 root root 22 May 3 12:16 /usr/bin/java -> /etc/alternatives/java

ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 36 May 3 12:16 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java

ls -l /usr/lib/jvm/java-6-sun/jre/bin/java
-rwxr-xr-x 1 root root 50794 Feb 2 17:25 /usr/lib/jvm/java-6-sun/jre/bin/java
Note that in my case, the read/execute bits are set for user, group, and other. If you are missing the "other" bits, you will be forced to use sudo. Remember that to execute a file, you must be able to read it: thus the read and execute bits. In my system's case, I would use the following command:

Quote:
sudo chmod a+rw /usr/lib/jvm/java-6-sun/jre/bin/java
I like the wikipedia entry for the chmod command.

I hope that helps...

--jason
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
permission issue user52 Linux - Newbie 4 01-02-2011 02:03 AM
Permission issue linson_85 Linux - General 3 10-24-2010 09:30 AM
Issue with permission? your_shadow03 Linux - Server 1 11-22-2009 06:57 AM
Permission issue??? ThunderStrick Linux - Newbie 4 07-06-2009 11:41 PM
issue with permission santasballz Linux - Newbie 7 02-28-2004 11:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration