1

I want to use an NFS share for backing up. I have created a local user on the client with a specific uid/gid combination that works for writing files to the NFS share. So far so good.

However, I need sudo to read all users' home directories on the local box for backup purposes. But when I do that, the uid/gid is set to 0 and I can't access the NFS share anymore. How do I get around this without access to the server or changing permissions on local files?

NFS-woes
  • 11
  • 1
  • You can't. You will have to change your backup strategy (eg, to many small backups each running as an individual user). – MadHatter May 07 '15 at 04:20
  • Is there not even a way with some `idmapd` cleverness? – NFS-woes May 07 '15 at 04:36
  • you can export with no_root_squash and later on change files ownership to desired uid/gid – kofemann May 07 '15 at 06:56
  • That requires access to the server, to change `/etc/exports`. The question says the OP has no such access. – MadHatter May 07 '15 at 11:56
  • You could use `tar` to preserve file ownership and other metadata and copy or pipe the tarfile to a process running as an ordinary user to store it on the NFS server. – Dima Chubarov May 08 '15 at 10:16

0 Answers0