NFS mount as a specific user

By mrzapp ·
Tags: Linux
Can I mount an NFS share in a way that it will show up as owned by a specified user and group on the client? I want the client to decide which user the share is mounted as, so "all_squash" doesn't seem like an option, unless I'm misunderstanding something. I have read countless pages about NFS mapping, but never gotten a solid answer to this question.


I have a NAS with a "/data" folder owned by "data:data". This folder is exported via NFS on the local network like this:


I also have a client (my web server) that mounts this exported folder like this: /data nfs defaults 0 0

All files show up on the client as owned by "data:data", which is what I expect.

The client runs NextCloud and various other server software through Docker as the "www-data" user, so I want the "/data" NFS share to show up as owned by "www-data:www-data".
Thread display: Collapse - | Expand +

All Answers

Share your knowledge

Related Discussions

Related Forums