NFS write Error

Posted on 2011-04-21
Last Modified: 2012-08-13
I have an NFS server where /home is exported. On the Client I can mount the FS with NFS4. But I am not able to write anything on the NFS imported share.

On server:
# cat /etc/exports
/exports        *(ro,sync,insecure,root_squash,no_subtree_check,fsid=0)
/exports/home   *(rw,nohide,sync,insecure,root_squash,no_subtree_check)
# df -h |grep home
/dev/mapper/VolGroup00-home  194G   36M  184G   1% /home

On client
# df -h|grep home
Server:/home          194G   36M  184G   1% /home_new

I am able to see the files but I am not able to write to share from client

Question by:mnis2008
    LVL 38

    Expert Comment

    > /exports        *(ro,sync,insecure,root_squash,no_subtree_check,fsid=0)
    On NFS server, take out this line.
    # chmod 755 /exports
    # exportfs -a
    LVL 38

    Accepted Solution

    Is this related to (root_squash) , which cause root can not write it on the client side?

    By default, root_squash is set,
    If you want root on the client side to be able to write to NFS mount, you need to export as no_root_squash.
    However, no_root_squash will cause root user on client side to delete the files on NFS share.
    LVL 3

    Assisted Solution

    In man of "exports" is given exaple:

    /home/joe       pc001(rw,all_squash,anonuid=150,anongid=100)

    anonuid and anongid
                  These options explicitly set the uid and gid of the anonymous account.   This  option  is  primarily  useful  for PC/NFS  clients, where you might want all requests appear to be from one user. As an example, consider the export entry for /home/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe).


    /               master(rw) trusty(rw,no_root_squash)

           The  first  line  exports  the  entire  filesystem  to machines master and trusty.  In addition to write access, all uid squashing is turned off for host trusty.


    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now