[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 589
  • Last Modified:

Cannot write to NFS-mounted directories

I've got two Red Hat Linux boxes, running Red Hat 6.0.  I can successfully mount an NFS directory on the client, and list the files, and display them.  They all appear to have read-write priviledges, but I'm unable to edit a file, or write in any way to the NFS-mounted directory. This problem arises both as root and as an ordinary user. The NFS server has an /etc/exports file without tabs, and with a (rw) code immediately after the client name (no spaces).  The machines as also linked in a NIS server-client relationship, running ypserv 1.3.6.94 (the ypserv 1.3.6.91 originally supplied on the RedHat CD didn't work properly with yppasswd).

A couple of oddities:
1. /proc/filesystems on the NFS server shows
        ext2
nodev   proc
        iso9660
nodev   devpts

I had expected to see nfs in there, yet nfs support is now supposed to be modular, so hoping that I don't have to rebuild the kernel (worry!)

2. The showmount command described in RedHat's NFS-Tips web document is missing from my machines.

I'm obviously overlooking something simple here.  Many thanks in advance for any help.
0
doyston
Asked:
doyston
  • 4
  • 4
1 Solution
 
ahoffmannCommented:
If you have an /etc/exports file, what did exportfs tell you?

> showmount .. is missing ..
Did you search with
      find / -name showmount
for it?
0
 
doystonAuthor Commented:
exportfs works fine, giving:
/aton_data   lidate.nad.ac.ie

I've tried finding showmound with the find command, but no success.
0
 
williacrCommented:
Couple of things...

First off the showmount command is part of the knfsd-clients package you might want to install it there.

Second, more like an FYI the nfs filesystem support is only needed on the client therefor your server doesn't need it since it's not mount'n a nfs filesystem, you get the jist...

Third, make sure that your user is being looked up from NIS and not the local /etc/passwd file, but more importantly that your userid on the server match the userid on your client.

You need to add the no_root_squash option to the exports file to allow root to write to the filesystem (else it automagically gets mapped to the user nobody)

Hope this helps
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
ahoffmannCommented:
can you get the reverse address resolution on your server for  lidate.nad.ac.ie ?

> Third, make sure that your user is being looked up from NIS and not the local /etc/passwd file, ..
has no impact on mount requests, if you files or NIS or whatever
0
 
doystonAuthor Commented:
The user is definitely being looked up from the NIS password list (in fact the user does not even have an entry on the NFS/NIS client password machine file).

Could you clarify what you mean by 'reverse address resolution' on the server, as I don't fully understand you (Linux newbie here!).

Thanks
0
 
ahoffmannCommented:
assuming that  lidate.nad.ac.ie is the client which requests the mount, could you do on the server:

    nslookup  lidate.nad.ac.ie

if it reports an error,  lidate.nad.ac.ie must be listed in /etc/hosts *AND* /the resolver (etc/hosts.conf) must be configure to use DNS and /etc/hosts
0
 
doystonAuthor Commented:
OK thanks- nslookup reports no errors, and correctly shows the DNS server as well as lidate.nad.ac.ie.  Any other suggestions of things to try...?
0
 
ahoffmannCommented:
do you have a DENY clause in /etc/hosts.deny (please read man hosts.access)
0
 
doystonAuthor Commented:
Problem solved: the fault was actually in the NIS part of the setup, not the NFS side of things.  I'd forgotten to increase my group id number to above the minimum defined in the yp makefile.  Once changed, everything works fine.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now