Operating System - HP-UX
1822421 Members
3091 Online
109642 Solutions
New Discussion юеВ

Re: NFS mount only works with root?

 
SOLVED
Go to solution
Daniel Gowans
Advisor

NFS mount only works with root?


I am attempting to connect an HPUX box to a Redhat 9 box with NFS enabled. HPUX is the client, RedHat is the Server. I have very little control over the Redhat server. It is the FTP server for the company, for customers to upload files to. On my HPUX machine I have a cron job that is designed to look through the upload directory every 20 minutes and process files. However, I have to mount it first!

On Redhat:
My machine is in hosts.allow
/etc/exports:
/home/FTPRoot *(rw,unsecure,no_root_squash)

I use the command on HPUX (as root):

mount ftp.xxx.com:/home/FTPRoot /cust_ftp

This works fine as root. I have access, all is well.

However, once I go to another non-root user, all access is lost:

>ls
. unavailable (or something like that)
>

Why is it that I can't access it except as root? Ideally, it would be just the opposite...

Both machines have the user I am logged on as when I connect, with the same UID and GID. However, I am not sure the user was set up correctly on the Linux machine.

Any ideas? Some brainstorming would really help. Thanks!
8 REPLIES 8
Patrick Wallek
Honored Contributor

Re: NFS mount only works with root?

What are the permissions/ownership on the /cust_ftp dir on the HP-UX system after you NFS mount it? What are the permissions/ownership before you do the mount? It sounds like a permissions problem.
Umapathy S
Honored Contributor

Re: NFS mount only works with root?

Daniel,
Its a sure pemissions problem. Since you were able to access the remote dir as root, I believe, normal users on the local machine are not having sufficient permissions.

HTH,
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Zigor Buruaga
Esteemed Contributor
Solution

Re: NFS mount only works with root?

Hi,

" ... If you are not root, then usernames may not be in sync on the client and the server. Type id [user] on both the client and the server and make sure they give the same UID number. If they don't then you are having problems with NIS, NIS+, rsync, or whatever system you use to sync usernames. Check group names to make sure that they match as well. Also, make sure you are not exporting with the all_squash option. If the user names match then the user has a more general permissions problem unrelated to NFS. ... "

Extracted from chapter 7.4. "I do not have permission to access files on the mounted volume." from http://www.yolinux.com/HOWTO/NFS-HOWTO.html#CONFIG

Hope this helps.
Kind regards,
Zigor
Suresh Patoria
Super Advisor

Re: NFS mount only works with root?

Hi,

On server side in /etc/exports file remove the no_root_squash

Thanx
Daniel Gowans
Advisor

Re: NFS mount only works with root?


I was having a difficult time getting cooperation from the person administering the machine I was connecting to. However, one night I found the room open, and root was logged into the machine.

It was certainly a permissions problem. The admin said he had entered a user by the name I needed on the machine, but had failed to set the right group or user id. After changing the user ID and adding the necessary groups, I was able to access everything I needed to.

In addition, now that it is working with the normal users, the admin has removed the no_root_squash option. Thanks again, all!
Umapathy S
Honored Contributor

Re: NFS mount only works with root?

Daniel,
Open room with root login also.
Many times the bureaucracy settings force us to do like this.
Nice weekend.
cheers
Umapathy
Arise Awake and Stop NOT till the goal is Reached!
Steven E. Protter
Exalted Contributor

Re: NFS mount only works with root?

Daniel,

I'm glad your issue is solved.

This shows your organization has a serious security problem that should be dealt with.

It would be a good idea to address that. I'm not sure I'd have the guts to make your last post, even if I did what you did.

HP can remove the post if you wish. Issues thread.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Daniel Gowans
Advisor

Re: NFS mount only works with root?


Thanks, Stephen

I notified the right people after it occurred and detailed what I had changed to the admin in question. While somewhat incensed, he was fine with the changes that I made. Luckily there is a level of trust.

However, I made know that a non-trusted person could have entered that room and done bad things to that machine (it is our FTP server)

So, you might say, the cat is out of the bag. Thanks for your words of caution, though.