[Solved] nfs share permissions with java


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users [Solved] nfs share permissions with java
# 1  
Old 09-21-2011
[Solved] nfs share permissions with java

Please bare with me while I try to explain this weird problem.

We are exporting a filesystem from an aix box to two linux boxes.
On the linux box a java-weblogic application hits the share.
For explanation benefits I'll describe the users thus.

aix filesystem owned by userA in groupA
on the linux systems we made the same user
so the shared files are also owned by userA and groupA.
The uids and gids are the same across the systems.

The java - weblogic application is started and runs (supposedly) as userB GroupB

On the linux systems we put userB in GroupA also. ( userB primary group B, and also in group A )

This means that if I put a file in the linux shared filesystem that is owned by userA groupA, if the permissions are 660, UserB can still read the file because he is in groupA.
This bears out with my tests. I can vi the file.

The problem is that when the application runs and does some java call to read the file, it gets permission denied. It cannot read the file unless I make the file have world read permissions. (at least 664 ).

My only guess is that somewhere in the stack between the Java, Weblogic, application ears, there is another uid being set and it is NOT userB who is trying to read the file.

But this same exact setup works perfectly on in our QA environment which is built the same ( supposedly ). The developers told me that there is no difference in weblogic or java on either system so if it's not working in prod, there must be something else in the configuration.
I checked the uids, gids, etc.. and they all look the same between the two systems.
The /etc/vstab is the same on all linux boxes with no options.
Same with the /etc/exports file on the aix box.

Now I am lost and don't know where to look.
Does anyone have any ideas where else I can look or how I can go forth troubleshooting this issue ?

Thanks !
Floyd

---------- Post updated 09-21-11 at 10:39 AM ---------- Previous update was 09-20-11 at 05:57 PM ----------

Problem solved.
I dropped the group entry for userb into groupa and readded.
works as advertised now.
# 2  
Old 10-09-2011
Hi,

We are facing a simialr issue.
We have an user id weblogic, that belongs to groups weblogic and batch. weblogic, batch owns the NFS.
We have created a new user id weblogic10 and added it to groups weblogic and batch.
JAVA programs submitted by weblogic10 through the weblogic application server are getting a "permission denied" error.
We are able to access / edit the files from the Linux box with the id weblogic10.

What exactly you did to fix the problem?
Any help you can provide is much appreciated. We are under tight timeline constraints.

Thanks
# 3  
Old 10-11-2011
Quote:
Originally Posted by fibzo
Hi,

We are facing a simialr issue.
We have an user id weblogic, that belongs to groups weblogic and batch. weblogic, batch owns the NFS.
We have created a new user id weblogic10 and added it to groups weblogic and batch.
JAVA programs submitted by weblogic10 through the weblogic application server are getting a "permission denied" error.
We are able to access / edit the files from the Linux box with the id weblogic10.

What exactly you did to fix the problem?
Any help you can provide is much appreciated. We are under tight timeline constraints.

Thanks
Hello,
It actually turns out the problem is not solved yet. I thought it was, but it wasn't.
It appears that Java is not creating the file as the userid we expect. Our developers are too busy to look into it, so as a temporary fix we are running a cronjob to change the permissions every minute.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mount NFS Share On NFS Client via bash script.

I need a help of good people with effective bash script to mount nfs shared, By the way I did the searches, since i haven't found that someone wrote a script like this in the past, I'm sure it will serve more people. The scenario as follow: An NFS Client with Daily CRON , running bash script... (4 Replies)
Discussion started by: Brian.t
4 Replies

2. Red Hat

NFS share and groups

I am having an issue with getting the proper group settings on NFS-shared directories. NFS server, NFServe, nfs-shares hundreds of project directories...running Solaris 10 latest patches/updates. SAS server, SAServe, statistical analysis server running on RedHat 7 with latest kernel/patches/etc.... (14 Replies)
Discussion started by: cjhilinski
14 Replies

3. UNIX for Dummies Questions & Answers

Permissions for NFS share

Hi, I have created a NFS share in Solaris 10 server1 and mounted it on solaris 10 server 2.But I want to change owner of the files from nobody to a particular user in client. Which command should I use. I have tried the following but it doesn't allow to change permissions in the server2 as... (0 Replies)
Discussion started by: Rossdba
0 Replies

4. Red Hat

NFS share

Hi, I have an NFS server, i want to mount that nfs share which is having around 500GB to my client system. But my client system doesnt have any free space, is it possible to mount that nfs share in my client. Regards, Mastan (1 Reply)
Discussion started by: mastansaheb
1 Replies

5. UNIX for Advanced & Expert Users

du and df do not match on NFS share

Here is the scenario... NFS share that is accessed every few minutes by approx 70 systems (AIX 5.3/6.1). Filesystem space is being eaten up rapidly according to df however du numbers really never change. lsof and fuser cannot see any unlinked files on either the NFS server or remote... (3 Replies)
Discussion started by: masterpengu
3 Replies

6. IP Networking

Problem Mounting NFS share

I have one machine "The server" ip: 192.168.1.1, it runs ubu 8.04(LTS) and - I have a folder (/shareme) that I want to share with other linux machines on my LAN. - The server runs NFS server and common and portmap and so do the other machines on my LAN. - The server has the export file with the... (2 Replies)
Discussion started by: fcron
2 Replies

7. OS X (Apple)

[Solved] How to share the DVD-drive with Mac OSX NFS

:confused: Hi, im a newbie with a mac osx problem: i can't share the DVD-drive of my macbook pro with NFS: OSX 10.5.8: My /etc/exports: /Users/NFS -mapall=502 -ro -network 192.168.1.0 -mask 255.255.255.0 /Volumes/MIT_HERZ_UND_HAND/VIDEO_TS -maproot=502 -ro the /Users/NFS share... (1 Reply)
Discussion started by: joker45
1 Replies

8. Red Hat

Issues with LDAP user/group permissions on NFS share

I can't seem to make sense of this. $ cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.2 Beta (Tikanga) $ $ mount /dev/sda2 on / type ext3 (rw) proc on /proc type proc (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw,gid=5,mode=620) /dev/sda1 on... (6 Replies)
Discussion started by: dfinn
6 Replies

9. Red Hat

NFS share error

I got a problem while creating files on a NFS mounted share in a RHEL box. That is when I create an empty file, this is what appears on the screen ############################################### E325: ATTENTION Found a swap file by the name ".test.swp" owned by: jsmith dated: Tue... (2 Replies)
Discussion started by: rcmrulzz
2 Replies

10. Solaris

NFS share options

Hello, I'm doing a Perl script to parse the dfstab file and find dangerous configurations (rw to everyone, root access, etc). My question is, if I have a share command like this: share -F nfs -o ro=chrome:copper:zinc,root=chrome /usr/man it means that the /usr/man is "rw" to everyone... (6 Replies)
Discussion started by: psimoes79
6 Replies
Login or Register to Ask a Question