Hey guys,
I just tried installing jdk 1.0.7 on my centos 5.6 box and I am getting a permission denied error when I try to display the java version.
[root@VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0 /etc/alternatives/jdk [root@VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0/bin/java /etc/alternatives/java [root@VIRTCENT09:/usr/lib] #ln -s /etc/alternatives/java /usr/bin/java [root@VIRTCENT09:/usr/lib] #java -version Error: dl failure on line 875 Error: failed /usr/lib/jdk1.7.0/jre/lib/i386/client/libjvm.so, because /usr/lib/jdk1.7.0/jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: Permission denied
I tried opening up the permissions every step of the way along the path to /usr/lib/jdk1.7.0/jre/lib/i386/client/libjvm.so but no luck so far.
I would certainly appreciate any advice you'd be willing to provide!
thanks!! tim
Hi Barry,
Apparently the problem was SELinux! I did a 'setenforce 0' and was able to login to ftp!
[root@LCENT05:~] #getenforce Permissive [root@LCENT05:~] #/usr/bin/ftp localhost Connected to localhost (127.0.0.1). 220 FTP Server ready. Name (localhost:root): bluethundr 331 Password required for bluethundr Password: 230 User bluethundr logged in Remote system type is UNIX. Using binary mode to transfer files.
Thanks!!
tim
----- Original Message ----- From: "Barry Brimer" lists@brimer.org To: "CentOS mailing list" centos@centos.org Sent: Saturday, August 13, 2011 11:04:13 AM Subject: Re: [CentOS] java permission denied
I just tried installing jdk 1.0.7 on my centos 5.6 box and I am getting a permission denied error when I try to display the java version.
What are your SELinux settings? Are there any messages in /var/log/audit/audit.log
Barry _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
actually i replied to the wrong thread. D'OH! But it seems that SELinux was behind each problem..
setenforce 0 on that machine allowed it to work. Tho I readily admit that I wish I was more familiar with SELinux. :)
[root@VIRTCENT09:/usr/lib] #java -version java version "1.7.0" Java(TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode)
----- Original Message ----- From: "Tim Dunphy" bluethundr@jokefire.com To: "CentOS mailing list" centos@centos.org Sent: Saturday, August 13, 2011 11:52:12 AM Subject: Re: [CentOS] java permission denied
Hi Barry,
Apparently the problem was SELinux! I did a 'setenforce 0' and was able to login to ftp!
[root@LCENT05:~] #getenforce Permissive [root@LCENT05:~] #/usr/bin/ftp localhost Connected to localhost (127.0.0.1). 220 FTP Server ready. Name (localhost:root): bluethundr 331 Password required for bluethundr Password: 230 User bluethundr logged in Remote system type is UNIX. Using binary mode to transfer files.
Thanks!!
tim
----- Original Message ----- From: "Barry Brimer" lists@brimer.org To: "CentOS mailing list" centos@centos.org Sent: Saturday, August 13, 2011 11:04:13 AM Subject: Re: [CentOS] java permission denied
I just tried installing jdk 1.0.7 on my centos 5.6 box and I am getting a permission denied error when I try to display the java version.
What are your SELinux settings? Are there any messages in /var/log/audit/audit.log
Barry _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Sat, 13 Aug 2011, Tim Dunphy wrote:
actually i replied to the wrong thread. D'OH! But it seems that SELinux was behind each problem..
setenforce 0 on that machine allowed it to work. Tho I readily admit that I wish I was more familiar with SELinux. :)
You can use audit2allow to create SELinux policy for whatever is not working. I'd hate for you to disable SELinux altogether because of a few issues.
Barry
Hey Barry,
That's good to know. Thank you again!
tim
----- Original Message ----- From: "Barry Brimer" lists@brimer.org To: "CentOS mailing list" centos@centos.org Sent: Saturday, August 13, 2011 12:05:08 PM Subject: Re: [CentOS] java permission denied
On Sat, 13 Aug 2011, Tim Dunphy wrote:
actually i replied to the wrong thread. D'OH! But it seems that SELinux was behind each problem..
setenforce 0 on that machine allowed it to work. Tho I readily admit that I wish I was more familiar with SELinux. :)
You can use audit2allow to create SELinux policy for whatever is not working. I'd hate for you to disable SELinux altogether because of a few issues.
Barry _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On 08/13/2011 12:24 PM, Tim Dunphy wrote:
Hey Barry,
That's good to know. Thank you again!
tim
----- Original Message ----- From: "Barry Brimer" lists@brimer.org To: "CentOS mailing list" centos@centos.org Sent: Saturday, August 13, 2011 12:05:08 PM Subject: Re: [CentOS] java permission denied
On Sat, 13 Aug 2011, Tim Dunphy wrote:
actually i replied to the wrong thread. D'OH! But it seems that SELinux was behind each problem..
setenforce 0 on that machine allowed it to work. Tho I readily admit that I wish I was more familiar with SELinux. :)
You can use audit2allow to create SELinux policy for whatever is not working. I'd hate for you to disable SELinux altogether because of a few issues.
Barry _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Most likely you have a labeling problem and sure make sure your labeling is good.
fixfiles restore
Should fix the labels. Just adding rules via audit2allow should be handled carefully since you are just allowing any access including potentially bad access.
http://danwalsh.livejournal.com/30837.html
On Mon, 2011-08-15 at 06:08 -0400, Daniel J Walsh wrote:
Thank you. I've started reading it immediately. It is very useful.
Hey guys,
I just tried installing jdk 1.0.7 on my centos 5.6 box and I am getting a permission denied error when I try to display the java version.
[root@VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0 /etc/alternatives/jdk [root@VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0/bin/java /etc/alternatives/java [root@VIRTCENT09:/usr/lib] #ln -s /etc/alternatives/java /usr/bin/java [root@VIRTCENT09:/usr/lib] #java -version Error: dl failure on line 875 Error: failed /usr/lib/jdk1.7.0/jre/lib/i386/client/libjvm.so, because /usr/lib/jdk1.7.0/jre/lib/i386/client/libjvm.so: cannot restore segment prot after reloc: Permission denied
I tried opening up the permissions every step of the way along the path to /usr/lib/jdk1.7.0/jre/lib/i386/client/libjvm.so but no luck so far.
I would certainly appreciate any advice you'd be willing to provide!
It's running fine here with the Oracle rpms but I'm not using the alternatives stuff.
I have
export JAVA_HOME="/usr/java/default"
and symlinks like so
lrwxrwxrwx 1 root root 26 Aug 4 11:25 /usr/bin/java -> /usr/java/default/bin/java lrwxrwxrwx 1 root root 27 Aug 4 11:25 /usr/bin/javac -> /usr/java/default/bin/javac lrwxrwxrwx 1 root root 29 Aug 4 11:25 /usr/bin/javadoc -> /usr/java/default/bin/javadoc lrwxrwxrwx 1 root root 28 Aug 4 11:25 /usr/bin/javaws -> /usr/java/default/bin/javaws
Regards, Simon