Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Linux JAVA in path but permissions denied

Im trying to get JAVA enabled on Intel Edison which uses Yocto (Linux), the problem is that after extracting the zip, im able to check the version, and when putting it into the path, im not able to access java at all due permissions.

Specifically im trying to follow this tutorial but i get "stuck" at the

. .profile

since next step

java -version

throws same issue as pasted below, permissions denied or as earlier, java was not found.

Heres a quick overview of output:

root@dedsec1:~/java/jdk1.7.0_67/bin# ./java -version
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) Client VM (build 24.65-b04, mixed mode)
root@dedsec1:~/java/jdk1.7.0_67/bin# cd
root@dedsec1:~# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/root/bin:/home/root/java/jdk1.7.0_67/bin:/home/root/java/jdk1.7.0_67/bin
root@dedsec1:~# ./java -version
-sh: ./java: Permission denied
root@dedsec1:~#

What the hell am i missing ? I have set chmod -x on java but it doesnt seem to affect it.

like image 467
Deko Avatar asked Nov 01 '14 04:11

Deko


Video Answer


1 Answers

sudo chmod a+x /usr/bin/java
sudo chmod a+x /usr/bin/javac
sudo chmod a+x /usr/bin/javaws
sudo chown -R root:root /usr/lib/jvm/jdk1.8.0
like image 115
Srinivasu Avatar answered Oct 01 '22 09:10

Srinivasu