Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a jar file, which works in many machines. However we just asked for a new unix user to install it, and it is not behaving the same... wonder if it could be anything related to some env. var.

the basic idea is:

WorkingUser@box$ java -jar install.jar -h
[output help instructions]

but then

NewUser@box$ java -jar install.jar -h
The java class is not found:  pkg1.pkg2.pkg3.Loader

Before anyone asks, there is no classpath needed and yes, the cksum for the jar is ok. in fact:

$ jar tf install.jar
META-INF/
META-INF/MANIFEST.MF
pkg1/
pkg1/pkg2/
pkg1/pkg2/pkg3/
pkg1/pkg2/pkg3/script/
pkg1/pkg2/pkg3/Loader.class
pkg1/pkg2/pkg3/LoaderHelper.class
package.jar

And you can figure that the MANIFEST.MF is fine, since it works in other users.

I have tried executing with -cp install.jar with no success. Also the $CLASSPATH for working and not working users contains only ".".

[EDIT]

I seem to have found more weird things on this new user. There are few other things not working which may indicate a problem with the user creation. Unfortunately I don't know to much of user administration in AIX, so I hope you guys can help me to figure out from these leads;

I have just found that simple tar cannot be created into this user's home.

NewUser@box$ echo "thisisatest" > testfile.txt
NewUser@box$ tar cf testfile.txt.tar testfile.txt
tar: The getwd subroutine failed.
        Cannot open the parent directory.

NewUser@box$ ls -l testfile*
-rw-r-----    1 user  group             12 Feb 08 14:15 testfile.txt
-rw-r-----    1 user  group              0 Feb 08 14:15 testfile.txt.tar

(Notice how testfile.txt.tar has 0 bytes?)

Needless to say, all these commands works on the other user.

Apart from that, there's another small symptom regards connecting with scp, WinSpc actually.

The connection wont work yielding the following error at first: scp error without configuring it

To correct this error, I simply have to configure remote path in WinScp's configuration (which apparently defines the path to the user home) and it will work fine.

I use WinScp in the other server and it works just fine without any configuration - I ignored this error at first, but now seems more relevant.

Note that /etc/passwd has all the correct parameters for this user. It might be some dodgier configuration...

Also, the home folder has all the correct permissions - I'm not to sure how that "sticky bit" relates to it, but.. well..

Thanks in advance!

thanks,

f.

share|improve this question
    
Are java versions the same for old and new users? You can check using java -version. –  Alex Feb 8 '11 at 12:21
    
yep. they are... same build actually. –  filippo Feb 8 '11 at 12:31
    
Can you run it under strace? strace java -jar install.jar and post the output (might be big!) –  davey Feb 8 '11 at 13:20
    
do that in a jiffy, meanwhile you might want to check the new info I just added. thanks! –  filippo Feb 8 '11 at 13:31
    
OK. It's AIX so I don't think you will have strace (unless it has some Linux utilities installed). Check if you have a command called "truss". I don't know if AIX has that. –  davey Feb 8 '11 at 15:50

1 Answer 1

up vote 0 down vote accepted

Try copying the file to /tmp or /var/tmp and running the install from there. Does it get further/succeed?

[EDIT]

This was pretty close to the actual problem. I ended up doing a similar test which worked and which with some testing lead me to find that the mount point permissions were wrong, i.e. the folder where the user's fs is mounted belongs to root and had access 774 (no exec to others).

I find always fascinating how wrong permissions in a low level cause the most adverse effects in the upper layers. I had (and I'm still not quite sure of it) that the permissions of the mount point had affect the mounted fs...

Anyways, we gave it the exec permission and voilá, java finds it's classes. There are more problems with this whole installation, but these might go to other questions :)

Thanks all.

share|improve this answer
    
Sorry for the delay. Quite a good call it got me very close to the actual problem. If you don't mind I'll edit you post and mark as the answer. –  filippo Feb 9 '11 at 16:01

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.