FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 08-13-2011, 02:54 PM
Tim Dunphy
 
Default 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@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-13-2011, 03:04 PM
Barry Brimer
 
Default 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
 
Old 08-13-2011, 03:04 PM
"Simon Matter"
 
Default 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@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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-13-2011, 03:52 PM
Tim Dunphy
 
Default 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
 
Old 08-13-2011, 03:55 PM
Tim Dunphy
 
Default 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@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-13-2011, 04:05 PM
Barry Brimer
 
Default 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
 
Old 08-13-2011, 04:24 PM
Tim Dunphy
 
Default java permission denied

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
 
Old 08-13-2011, 04:28 PM
Barry Brimer
 
Default java permission denied

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

You're welcome.
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-15-2011, 10:08 AM
Daniel J Walsh
 
Default java permission denied

-----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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5I8DYACgkQrlYvE4MpobPPsQCgnaAlGVWOZl C2mjqmAJI8GeBb
/bMAoK6SLkhuerIGBYhZpFp/0J1avTw9
=9dzB
-----END PGP SIGNATURE-----
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 08-15-2011, 10:20 AM
Always Learning
 
Default 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.


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:45 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org