Skip to main content

Notebook entry

Setting up an NFS server on CentOS

Lovell Felix 1 min read

Archive note: the tools and versions have moved on. I have kept this entry because the debugging path and the underlying constraint may still be useful.

A quick reference for standing up an NFS export on CentOS. Nothing exotic, just the sequence of steps that's easy to get slightly wrong if you're not doing it often, as a gist:

Two things worth calling out. First, disabling SELinux and the firewall outright is fine for a quick internal test box, but it's not the answer for anything that's staying up: the better path is an SELinux boolean for NFS exports (setsebool -P nfs_export_all_rw on) and a proper firewall rule scoped to the NFS ports, not a blanket setenforce 0. Second, no_root_squash in the export means the remote root user maps to local root on the export, which is exactly as dangerous as it sounds unless the client side is fully trusted. Both are fine defaults for a lab; neither is a default I'd carry into anything with real access to it.

About the author

Lovell Felix

Infrastructure and reliability engineer working on Linux platforms, configuration delivery, and deployment safety at fleet scale.

@lovellfelix

Continue through the notebook