Interview Prep/Linux/Permissions, ownership, SELinux and mounts

Writing to a file on an NFS mount fails with `Permission denied` for root, but works for the file owner.

IntermediateTroubleshootingPermissions, ownership, SELinux and mounts
Answer

Likely causes → root_squash on the export maps client root to nobody.

Diagnose →

cat /etc/exports           # on the server
ls -ln /mnt/share/file

Fix → Perform the action as the owning user (sudo -u app ...), or use no_root_squash only for trusted admin hosts.

Prevent → Run apps as consistent non-root UIDs across clients.

All Linux questions Roadmap: Linux

More on Permissions, ownership, SELinux and mounts