The mergerFS filesystem documentation says that norootsquash should be enabled for NFS…
- User
The mergerFS filesystem documentation says that no_root_squash should be enabled for NFS support. It then says: "no_root_squash is not strictly necessary but can lead to confusing permission and ownership issues if root squashing is enabled."
What kind of permission issues could there be if it's not enabled?
- Assistant
- User
So if the client is not running as root, it makes no difference?
- Assistant
Correct. If the client is not performing operations as the root user, then the
no_root_squashoption on the NFS server would not make a difference for those operations.The root squashing mechanism specifically targets the root user on the client. It modifies the behavior of how the NFS server treats requests from the root user, mapping them to an unprivileged user (typically
nobodyornfsnobody). If your client operations are performed by users other than root, those operations are already subject to the standard permission checks and mappings defined by regular UNIX permissions and any additional NFS export options that you may have configured.However, it's important to keep in mind that enabling
no_root_squashcan still indirectly affect non-root users if those users rely on files or directories created by the root user. For instance, if root creates a file on the NFS share with enabled, the file will retain its root ownership, which might restrict access to non-root users. Conversely, with root squashing in effect, a file created by the client's root would have changed ownership, potentially making it accessible to non-root users depending on the permissions set.