2

I have a freshly installed jdk1.8.0_121 on my redhat machine. When I ls -la in the installation directory, following output is received,

total 178952
drwxr-xr-x.  5 root        root               87 Mar 23 16:00 .
dr-xr-xr-x. 19 root        root              256 Mar 23 18:19 ..
drwxr-xr-x.  8   10         143              255 Dec 12 19:50 jdk1.8.0_121
-rw-r--r--.  1 root        root        183246769 Dec 14 14:42 jdk-8u121-linux-x64.tar.gz
drwxr-xr-x.  2 root        root                6 Mar  9  2015 rh

My concern is with this line,

drwxr-xr-x. 8 10 143 255 Dec 12 19:50 jdk1.8.0_121

Are these user ("10", for which there is no corresponding user) and group ("143", for which there is no corresponding group) expected or have I missed something while installation ?

2 Answers 2

4

That just means that the tarball stores files with user id (UID) of 10 and group id (GID) of 143, and since you extracted it as root, those identifiers were preserved. You haven’t missed anything, but you could chown the files to root:

chown -R root:root jdk1.8.0_121

This will avoid any surprises in future, should a user ever have id 10 on your system.

1

Java does not have a user, in the same way python does not have a user. As it is something that you will be letting any user run, you may wish to locate it in /usr/local/jdk_version and symlink with /usr/local/jdk.

Tomcat, jenkins etc can reference this from their start up scripts.

As Stephen points out, you should chown this to prevent future user ID 8 from taking ownership.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .