NFS write Error

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

Who is Participating?
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.
> /exports        *(ro,sync,insecure,root_squash,no_subtree_check,fsid=0)
On NFS server, take out this line.
# chmod 755 /exports
# exportfs -a
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.