How to prevent NFS clients from changing file ownership and permissions

Solution Verified - Updated -

Issue

  • NFS clients were able to change file attributes like ownership and permissions even though root_squash or all_squash was set on the NFS server
  • Why anonuid and anongid are not enforcing the uid and gid on the NFS mounted exports?

Environment

  • Red Hat Enterprise Linux (RHEL) 5.x, 6.x, 7.x, 8.x

    • All (RHEL) NFS Servers using the nfs-utils package
    • Exporting NFS shares with anonuid=0 or anongid=0 or no_root_squash:

      # cat /etc/exports
      /nfs/export1 *(rw,all_squash,anonuid=0,anongid=0)
      /nfs/export2 *(rw,no_root_squash)
      

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content