0

I have a few CentOS servers i would like to backup nightly.

I have created a NFS server with the following mounts :

  1. /backup/server1
  2. /backup/server2
  3. /backup/server3

On the CentOS servers i have mounted the nfs share as /backup and everything works fine with read and writes.

The issue is that the files sent over NFS are always ending up with root or nobody permissions (if all_root_squash is set).

How can i properly set quotas when my NFS clients all are using the same UID and the same root user?

1 Answers1

1

In your exports file you can use the anonuid and anongid to explicitly set the uid and gid of the anonymous account.

This option is especially useful in combination with the all_squash option which maps all uids and gids to the anonymous user, which you can then use to enforce your quota:

/backup/server1       server1(rw,all_squash,anonuid=1001,anongid=1001)
/backup/server2       server2(rw,all_squash,anonuid=1002,anongid=1002)
HBruijn
  • 77,029
  • 24
  • 135
  • 201