You can also use redhat-config-nfs to configure your NFS server in a GUI. To start it, run this command, or in GNOME (or KDE), use the Main Menu (K Menu) System Settings Server Settings NFS Server command. This opens the NFS Server Configuration menu shown in Figure 28.3.
To start the configuration process, click the Add button. This opens the Add NFS Share window shown in Figure 28.4. We ll look at configuring the directories described earlier with redhat-config-nfs . For your reference, the previous commands from /etc/exports that we ll be emulating are:
/mnt/cdrom *.example.com(ro,sync) big.example.com(rw,sync) /tmp *(rw,insecure,sync,no_wdelay,all_squash,anonuid=600)
As shown in Figure 28.4, we ve set up a share of the /mnt/cdrom directory, with read-only permissions for computers in the *.example.com domain. You can set up a separate share of /mnt/cdrom or /tmp to a specific computer such as big.example.com with read/write permissions.
Select the General Options tab, as shown in Figure 28.5. You can set up several of the options described in Table 28.5. By default, only Sync Write Operations On Request is active. Table 28.5 lists each option and its corresponding command.
Option | NFS command |
---|---|
Allow Connections From Ports 1024 And Higher | insecure |
Allow Insecure File Locking | insecure_locks |
Disable Subtree Checking | no_subtree_check |
Sync Write Operations On Request | sync |
Force Sync Of Write Operations Immediately | no_wdelay |
Select the User Access tab, as shown in Figure 28.6. Table 28.6 lists each option and its corresponding command.
Option | NFS command |
---|---|
Treat Remote Root User As Local Root | no_root_squash |
Treat All Client Users As Anonymous Users | all_squash |
Specify Local User ID For Anonymous Users | |
UID | anonuid= userid |
Specify Local Group ID For Anonymous Users | |
Group ID | anongid= groupid |
You ll note that the first two commands on this tab are mutually exclusive; in other words, you can t treat a remote user as root if you ve configured all NFS clients as anonymous users.
The Specify Local User ID and Specify Local Group ID options aren t configured with a corresponding NFS command; they make no sense and are therefore not activated unless you ve set a specific user or group ID. For more information on user and group ID concepts, see Chapter 09 .
The resulting /etc/exports file is slightly different from before; separate lines are required for the read-only and read/write setups to the computer and network specified earlier:
/mnt/cdrom *.example.com(ro,sync) /mnt/cdrom big.example.com(rw,sync) /tmp *(rw,insecure,sync,no_wdelay,all_squash,anonuid=600)
Remember, you can t configure NFS with redhat-config-nfs alone; for example, you still need to make sure that you don t have a firewall blocking NFS messages, as explained earlier in this chapter.
You also should make sure that the nfs and portmap daemons are started at the appropriate runlevels the next time you boot Linux.