Tim Dunphy | 13 Aug 16:54 2011

java permission denied

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 <at> VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0 /etc/alternatives/jdk
[root <at> VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0/bin/java /etc/alternatives/java
[root <at> VIRTCENT09:/usr/lib] #ln -s /etc/alternatives/java /usr/bin/java
[root <at> 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
Barry Brimer | 13 Aug 17:04 2011

Re: 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
Tim Dunphy | 13 Aug 17:52 2011

Re: java permission denied

Hi Barry,

 Apparently the problem was SELinux! I did a 'setenforce 0' and was able to login to ftp! 

[root <at> LCENT05:~] #getenforce
Permissive
[root <at> 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@...>
To: "CentOS mailing list" <centos@...>
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 
(Continue reading)

Tim Dunphy | 13 Aug 17:55 2011

Re: java permission denied

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 <at> 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@...>
To: "CentOS mailing list" <centos@...>
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 <at> LCENT05:~] #getenforce
Permissive
[root <at> 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.
(Continue reading)

Barry Brimer | 13 Aug 18:05 2011

Re: 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
Tim Dunphy | 13 Aug 18:24 2011

Re: java permission denied

Hey Barry,

 That's good to know. Thank you again!

tim

----- Original Message -----
From: "Barry Brimer" <lists@...>
To: "CentOS mailing list" <centos@...>
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@...
http://lists.centos.org/mailman/listinfo/centos
Barry Brimer | 13 Aug 18:28 2011

Re: java permission denied

> Hey Barry,
>
> That's good to know. Thank you again!
>
> tim

You're welcome.
Daniel J Walsh | 15 Aug 12:08 2011
Picon

Re: java permission denied


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@...> 
> To: "CentOS mailing list" <centos@...> 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@... 
> http://lists.centos.org/mailman/listinfo/centos 
> _______________________________________________ CentOS mailing list 
> CentOS@... http://lists.centos.org/mailman/listinfo/centos
(Continue reading)

Always Learning | 15 Aug 12:20 2011
Picon

Re: java permission denied


On Mon, 2011-08-15 at 06:08 -0400, Daniel J Walsh wrote:

> http://danwalsh.livejournal.com/30837.html

Thank you. I've started reading it immediately. It is very useful.

--

-- 
With best regards,

Paul.
England,
EU.
Simon Matter | 13 Aug 17:04 2011
Picon

Re: java permission denied

> 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 <at> VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0 /etc/alternatives/jdk
> [root <at> VIRTCENT09:/usr/lib] #ln -s /usr/lib/jdk1.7.0/bin/java
> /etc/alternatives/java
> [root <at> VIRTCENT09:/usr/lib] #ln -s /etc/alternatives/java /usr/bin/java
> [root <at> 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"
(Continue reading)


Gmane