I am sharing /share/global/usr/share from a server to /usr/share on a client via NFS. When the client writes into it I get "Read-only filesystem" error.


Filesystem permissions ok:

$> ls -la /share/global/usr/
drwxrwxrwx 2 nobody nogroup 4096 Dec  6 14:37 share

Exports are rw for client IP, other internal IPs are ro.

$> grep usr /etc/exports

Server can write here:

$> echo HELLO > /share/global/usr/share/REMOVEME && chmod 666 /share/global/usr/share/REMOVEME && echo ok


IP address matches (static):

$> ip addr | grep inet
inet brd scope global enp0s8

fstab specifies rw:

$> grep usr /etc/fstab /usr/share nfs rsize=8192,wsize=8192,timeo=3,intr,rw

and it's mounted rw:

$> mount | grep usr on /usr/share type nfs4 (rw,relatime,vers=4.0,rsize=8192,wsize=8192,namlen=255,hard,proto=tcp,port=0,timeo=3,retrans=2,sec=sys,clientaddr=,local_lock=none,addr=

Read is ok:

$> ls -al /usr/share/REMOVEME
-rw-rw-rw-. 1 nfsnobody nfsnobody 7 Dec  6 15:14 /usr/share/REMOVEME


On client:

$> sudo -i
$> echo foo > /usr/share/REMOVEME
-bash: /usr/share/REMOVEME: Permission denied

I also can't create new files here.

Everything in the configuration looks okay to me. Why can't I write to the shared directory on the client?

Server is Ubuntu 16.04, client is CentOS 7.

  • SElinux in play here?
    – steve
    Dec 6 '16 at 16:18

/etc/exports wants the specific IP addresses to appear first, IP ranges after.


  • I wonder if the ordering in your example is important because your IP range has a more restrictive permission granted than the single host. I think if the IP range was a different subnet from your single host, it could still be listed first.
    – MikeA
    Dec 6 '16 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.