Operating System - HP-UX
1837900 Members
3171 Online
110123 Solutions
New Discussion

Re: Odd NFS Permissions problem

 
SOLVED
Go to solution
Peter Heidbreder
Occasional Advisor

Odd NFS Permissions problem

I have a 11:31 server that I am exporting a file system from. It gets exported -rw.

The client can mount it with fine and can use it as long as the user on the client matches the user on the server. The exported file system is set to 755 per company policy.

On the client side root can't even write into the mount point. Is there another switch I need besides -rw?
7 REPLIES 7
Steven E. Protter
Exalted Contributor

Re: Odd NFS Permissions problem

Shalom,

IT would be helfpul to see a few things:

/etc/exports

Errors showing up in /var/adm/syslog/syslog.log

You are having a problem consistent with not having a NIS or LDAP master server controlling user id's numeric values and keeping them consistent.

If a user has id 445 on one system and 448 on a another this can cause NFS chaos.

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
Tim Nelson
Honored Contributor
Solution

Re: Odd NFS Permissions problem

11.31 uses ONCPlus. /etc/exports is no longer.

/etc/dfs/dfstab is the new /etc/exports.

"rw" means rw for those listed and ro for everyone else.

You need to set access= and then root= to allow only rw access to the list and root access to the list.

Peter Heidbreder
Occasional Advisor

Re: Odd NFS Permissions problem

I have made sure the users and groups are the same. I don't have a /etc/exports file as I am using a SG package to mount the file systems. The same problem is there testing by hand.

If I run "share" or "exportfs -v" I see my exported file systems are "rw" on the nfs server. I can't find any problems in the syslog file.

The key is to set the mounted directory to "777" If I set it to 755 root on the client side can't touch a file. In a nutshell I am looking for an export switch that will allow root on the client to rw without having to set the directory to 777.
Tim Nelson
Honored Contributor

Re: Odd NFS Permissions problem

Read my previous post.

Unless I am misunderstanding something, by default root does not have permissions to NFS dirs unless you export it, new term, share it, using the root= option.

Dennis Handly
Acclaimed Contributor

Re: Odd NFS Permissions problem

>If I set it to 755 root on the client side can't touch a file

As Tim said, you have mounted it with the default, root is less than dirt option. Root is anon, typically -2.

anon can read but but not modify the files.
Peter Heidbreder
Occasional Advisor

Re: Odd NFS Permissions problem

Thanks Tim. It was actually the root=host1:host2 switch that did the trick. I had to experiment with different options until I got it right. I also had to fully qualify the hostname (host1.customer.com). Now when I run the "share" command I see the right switches.

I modified my hanfs script to use the "root" option and the HA package exports the mount point properly.

Thanks all for your suggestions.
Peter Heidbreder
Occasional Advisor

Re: Odd NFS Permissions problem

I got it working with the pointers in the right direction.