Signal9Signal9 — home
online
back to labs

Export It: Share a Directory over NFS to a Client Network

EasyNetworking15-25 min
The brief

A directory needs to be shared over NFS to a specific client network, read-write or read-only per policy. Your per-session assignment is in /root/case/assignment.env (SHARE, CLIENT, MODE); read it and configure the export.

Two tasks:

1. Create the export directory SHARE if it doesn't exist.

2. Add an entry to /etc/exports that exports SHARE to CLIENT with access mode MODE. An export line is <dir><TAB><client>(<options>), e.g. /srv/nfs/data 198.51.100.0/24(rw,sync). Use the sync option and include MODE (rw or ro) as the access option.

Graded on /etc/exports and the directory — it does not start the NFS server, so editing the file directly works. On a live server, exportfs -ra re-reads the table and exportfs -v lists active exports.

What you'll do
  • Read the per-session assignment (share, client network, access mode)
  • Create the export directory
  • Add an /etc/exports entry exporting it to the client network with the right access mode
  • Understand /etc/exports syntax: dir, client(CIDR), and options

Hands-on lab: you work on a real Linux box in your browser, graded on the machine's actual state.