Cannot Change Ownership on NFS Files

Issue:

After moving mounted volumes from Qnap NAS to iMac as host with CentOS as client, the directory and file ownership cannot be changed to Apache at the client side. No matter using root or user privilege to command the chown.

Solution:

Add the following in iMac’s /etc/exports:

[nfsshare] -rw -maproot=root:wheel

Tricks:

-maproot directive can pass the root control from nfs host to client, without it even changing the directory access and file permission to 777 in host, or changing the mount options at client cannot solve the issue.

Config:

  • OSX:        10.12.3
  • CentOS:   7.3

 

Leave a Reply