NFS Server

The NFS Server allows you to export and share the directories and files on your PC with other hosts on the network.

Introduction

What is the NFS Server?

How To...

Start the NFS Server

Stop the NFS Server

Export a Directory

Connect a Drive to an Exported PC Directory

Unexport a Directory

Provide Read-Only Access

Restrict Access to Certain Hosts

Revoke a Host's Access Privilege

Enable NFS Server Logging

Troubleshoot NFS Server Problems


What is The NFS Server?

The NFS Server is a daemon program that runs on your PC, allowing you to share your files and directories with other computers (hosts) on your network. Using the NFS Server you can export a local directory located on your PC, or export a remote directory that you have mounted on your PC. Once you've exported a directory, a coworker can mount it and access its contents, just as they do with a directory located on a UNIX host. You restrict directory access by host (machine) name, rather than by user name.

When the NFS Server is running, the NFS Server icon appears on the desktop. Use this icon's system menu to access NFS server configuration settings, to enable NFS Server logging, and to access NFS Server help. The NFS Server application requires the services of the RPC Portmap application. Portmap is started automatically by the NFS Server. The presence of the Portmap icon on the desktop indicates that Portmap is running. Use the  Portmap icon's system menu to enable logging of Portmap activity, RPC activity, and Network traffic.

The NFS Server is a Winsock application and it supports NFS Version 2 functionality.

NOTE: The NFS Server will not turn your PC into a full-fledged file server. It is a mechanism for the casual sharing of PC-based files among a limited number of users.


Exporting a Remote Directory

You can use the NFS Server to export a remote directory that you have mounted on your local PC drive. In this situation, your PC acts as a relay agent of sorts, making the mounted directory available to a wider audience. For example, suppose you mount a NetWare or a Windows for WorkGroups directory on drive X. Using the NFS Server, you can subsequently export the directory mounted on drive X. Now others on the network, who normally can not access NetWare or Windows for WorkGroups directories, can share the files in the directory mounted on drive X.


NFS

Network File System - A facility that allows the sharing of files in a heterogeneous environment of computers, operating system software, and networks.


Daemon

The server portion of a client/server program. A daemon runs continuously on a computer and provides service to clients as they request it.


Export

To make an NFS directory available to other computers on the network.


Starting the NFS Server

To start the NFS Server:

1.	Double click on the NFS Server icon in the pro Group.

The NFS Server starts and it starts the Port Map program. Icons for each appear on the desktop.

Tip: Start the NFS Server automatically each time the Windows program is started by copying the NFS Server icon into the Windows Start Up Group.

Note: The Port Map application must be running whenever the NFS Server is in use.

See Also:

Exporting a File or Directory


Stopping the NFS Server

To halt the NFS Server:

1.	Click on the NFS Server icon on the desktop.

The NFS Server System menu opens.

2.	Choose Close.

The NFS Server program stops.

3.	Click on the Port Map icon on the desktop.

The Port Map system menu opens.

4.	Choose close.

The Port Map program stops.


Exporting a Directory

To export a directory:

1.	Start the NFS Server program.

NFS Server and Port Map icons appear on the desktop.

2.	Open the NFS Server icon's system menu and choose Configure NFS Server.

The NFS Server Configuration dialog box opens. Any previously exported directories are displayed in the Exported Directories list.

3.	Choose Create New Entry.

The Select Directory for Exporting dialog box opens.

4.	Select the directory to be exported and choose OK.

The Select Directory for Exporting dialog closes and the NFS Server Configuration dialog displays the directory path in the Exported Directories list.

5.	Choose Save.

The exported directory path is recorded on the Exports file and the directory is available for access by all hosts.

Note: By default, an exported directory is assigned World Access. This means it is available for reading and writing by all hosts on the network. You can limit access to read-only, and to specific hosts. See below.

See Also:

Unexporting a Directory

Providing Read-Only Access

Restricting Access to Certain Hosts


Connecting a Drive to an Exported Directory

To connect a drive to a directory exported by the NFS Server:

1.	Using the NFS Server, export a file system on a PC.

2. From another PC, open the File Manager Disk menu and choose Connect Network Drive.

The Network Drive Connections dialog box opens.

3.	In the Network Path edit box, enter the path to the exported PC file system.

For example, to connect to the C:\bin directory on a PC named biff, enter the following: biff:/c/bin

4.	Enter a drive letter in the Drive edit box and choose Connect.

The Network Drive Connections dialog box closes.

5.	Choose OK.

The selected drive is connected to the exported file system on the remote PC


Unexporting a Directory

To unexport a directory:

1.	Click on the NFS Server icon to open its System menu and choose Configure NFS Server.

The NFS Server Configuration dialog opens and displays a list of exported directories.

2.	Select the directory you want to unexport.

The directory is highlighted.

3.	Choose Delete Entry.

4.	Choose Save.

The directory is removed from the Exported Directories list and is no longer accessible to other hosts. Your changes to the Exported Directories list are saved.

Note: When you delete a directory entry from the Exported Directories list, hosts currently accessing the directory lose access immediately.


Providing Read-Only Access

To limit directory access to read-only privileges:

1.	Open the NFS Server icon system menu and choose Configure NFS Server.

The NFS Server Configuration dialog box opens.

2.	Select the directory you want to limit access to and choose Edit Access List

The Access List for... dialog box opens displaying the access permissions for the selected directory.

3. 	Check the Read Only check box and choose Save.

An X appears in the Read Only check box and the Access List for... dialog box closes. Access to the selected directory is limited to read-only.

 See Also:

Restricting Access to Certain Hosts


Restricting Access to Certain Hosts

To restrict directory access to specific hosts:

1.	Open the NFS Server icon system menu and choose Configure NFS Server.

The NFS Server Configuration dialog box opens.

2.	Select the directory you want to limit access to and choose Edit Access List

The Access List for... dialog box opens displaying the access permissions for the selected directory.

3.	Choose the Allow Specified Clients option button.

The Clients Allowed Access panel is activated.

4.	Choose Add Clients.

The Hosts allowed access to... dialog box opens.

5.	Enter in the edit box the names of all hosts you want to provide access (separate multiple host names with a space character) and choose OK.

The Hosts allowed access to... dialog box closes and the Access List  for... dialog box displays the names of hosts that are allowed access to the directory.

6.	Choose Save

The access permissions you've specified for the exported directory are saved. Only the specified host(s) can access the selected directory.

Note: Directory access is restricted according to host (machine) name, not user name. A user who cannot gain access to an exported directory from his own host may gain access by logging in to the network from another host.


Revoking a Host's Access Privilege

To revoke a host's access to an exported directory:

1.	Open the NFS Server icon system menu and choose Configure NFS Server.

The NFS Server Configuration dialog box opens.

2.	Select the directory you want to revoke access to and choose Edit Access List

The Access List for... dialog box opens displaying the access permissions for the selected directory.

3.	Select the host name whose access you are revoking.

The host name appears highlighted.

4.	Choose Delete Client.

The host name is deleted from the Clients Allowed Access list.

5.	Choose Save to record your changes.

The host can no longer access the selected directory

See Also:

Restricting Access to Certain Hosts


Enabling NFS Server Logging

Several types of NFS error logging are available: RPC logging, Port Map logging, Network Traffic logging, and NFS logging.

The type of logging you enable, and the error levels you set, are determined by the types of problems you are trying to solve. See How To Troubleshoot NFS Server Problems

 for more about when to enabling logging and the appropriate error levels to select.

1. 	Start the Network Event Log and set the error level to Debug.

The Network Event Log icon appears on the desktop.

2.	Enable RPC logging by opening the Port Map icon's system menu and choosing Log RPC Activity.

A check mark appears next to this menu item when RPC logging is enabled.

3.	Enable Port Map logging by opening the Port Map icon's system menu and choosing Log Port Map Activity.

A check mark appears next to this menu item when Port Map Activity logging is enabled.

4.	Enable Network Traffic logging by opening the Port Map icon's system menu and choosing Log Network Traffic.

A check mark appears next to this menu item when Network Traffic logging is enabled.

5.	Enable NFS logging by opening the NFS Server icon's system menu and choosing Log NFS Activity.

A check mark appears next to this menu item when NFS Activity logging is enabled.

6.	Periodically maximize the Network Event Log icon to view log contents.

See Also:

Guidelines for Enabling NFS Server Logging

What You Can Learn From Event Logging


Guidelines for Enabling NFS Server Logging

NFS Server logging lets you watch the interaction between client and server during an NFS connection.

Enable NFS Server logging when:

•	A client fails to mount a file system from a server, and gets no response from the server.

•	A client can mount a file system from a server, but cannot do anything with the files and gets no error message.

•	The error message doesnt clearly indicate whether the problem exists on the server, the client, or both.

Here are some guidelines for using Network Event Logging to pinpoint NFS problems:

•	Enable logging from one NFS component at a time so that you can isolate the problem.

•	Enable logging in the components in the order in which they are used during an NFS connection:

1.	RPC

2.	Portmap

3.	NFS

See Also:

What You Can Learn From Event Logging


What You Can Learn From Event Logging

Log Events For...	To Find Out...
RPC	Can the client connect to the server?
	Does the server recognize the client?
Port Map	Network software started and installed?
	Portmap daemon running on server?
	Are the portmap, rpc, and nfs services properly registered on both client and server?
	Are the client and server running the same versions of the NFS server?
NFS	Does the file exist on the server?
	Read-only or world access?
	Exported by the same name it is mounted from another system?
	Access restricted to some client machines?
Network Traffic	Exactly what data is passing into and out of the NFS Server and Portmap applications?

See Also:

Guidelines for Enabling NFS Server Logging


Troubleshooting NFS Server Problems

To diagnose a problem with an NFS connection, you need to look at errors that appear on the NFS client and errors that appear on the NFS server.

Some NFS server problems show up on the NFS client when it tries to mount a file system or network printer from the NFS server.  Other NFS server problems show up on the machine running the NFS server when you try to install and start the NFS server.

Select one of the following to see problems, possible causes, and solutions for errors that you might see on the:

•	NFS client

•	NFS server

To troubleshoot more general NFS errors and problems, view all incoming and outgoing data passing through the NFS Server and the Portmap by enabling the Log Network Traffic option.


NFS Server Problems

Here are some problems that you might have running the NFS server on your PC:

Problem	Possible Causes	Solution
Cannot start Portmapper or NFS daemon.	The network is not running on your machine.	Check your Network Setup to make sure that the network is installed and running on your PC.
Cannot export network drive.	You tried to export a directory that is already mounted on your PC drive with a different path name.  For example, if the original directory is exported as C:\123\BOB\ ,you cannot export it as C:\123\ or C:\123\BOB\PRIVATE\.	Export the directory using the exact path name that was used to mount it.
Cannot bind to Portmapper port.	The NFS server cannot locate and register itself with the Portmap program.  The Portmap program might have stopped working.	Exit and restart windows.

See Also:

NFS Client Problems


NFS Client Problems

Here are some problems you can have on an NFS client when mounting a file system from an NFS server:

Problem	Possible Causes	Solution
Server not known.	Your computer cannot find an internet address for the NFS server  in its name service (for example, NIS, DNS, or hosts file.)	Use ping to make sure you can reach the server machine. Ask your network administrator for the correct internet address and host name for the NFS Server machine. Use the TCP/IP configuration dialog box to add the correct internet address for the NFS server to your name service.
Illegal path.	The directory does not exist on the server.	Try to mount the directory level above the directory you could not mount.  Then, browse to see if the directory exists or is spelled differently.
	You typed the directory name incorrectly.	Mount again, using the correct spelling.
File not in export list.	The server is not exporting the directory.	On the server, use Configure NFS Server to export the directory.
Access denied.	The server does not export the directory to the client machine.	On the server, use Configure NFS Server to change the access list for the exported directory. See Restricting Access to Certain Hosts, and Revoking a Hosts Access Privilege.
Read only file system.	The server exports the directory with readonly permissions.	On the server, click on Edit Access List from the NFS Configuration dialog box.   Make sure the Read Only check box is not checked to allow full read, write, and execute permission to the exported directory.
Stale file handle.	Files on the server have changed, since the client mounted the file system.	Close the NFS server program and double click on its icon to restart the program.
Can mount a remote file system, but cannot mount a remote printer.	The printer whose server you are mounting might not be running pcnfsd.	Verify that the server is running pcnfsd by using the command: rpcinfo -u servername 150001 You should receive the response: proc 150001 is ready and waiting.   Make sure that the spool directory is exported by the server.  The default is /usr/spool/pcnfs.
Can mount a directory, but cannot create or edit a file in the directory.	Portmapper daemon not running on server.	On server, start the Network Event Log and set the error level to Debug. Enable RPC logging by opening the Port Map icons system menu and choosing Log RPC Activity. On the client, use the rpcinfo command to make sure that the Port Map daemon is running and registered correctly on the client and server: rpcinfo -u portmap rpcinfo -u servername portmap
RPC: program version mismatch.	The client and server are not running the same version of an RPC service, such as, Port Map or NFS.	On the server, enable Network Event Logging at the Debug error level. On the client, use the rpcinfo -p command  to check the version of RPC services running on the client and server: rpcinfo -p rpcinfo -p servername

See Also:

NFS Server Problems


Access List for....

By default, the NFS Server provides unrestricted (world) access to an exported directory. Anyone can mount the directory and edit files within the directory. However, you can use the Access List for... dialog box to limit directory access. You can limit access in two ways:

Read Only - Prevents anyone from editing files in or adding files to the directory.

Allow Specified Hosts - Limits directory access to only the host names you specify.

Click on the following for detailed instructions about limiting access.

Providing Read-Only Access

Restricting Access to Certain Hosts

Revoking a Host's Access Privilege