722 Part V . Running (Web server setup) Servers . User

722 Part V . Running Servers . User mapping If a user has login accounts for a set of computers (and has the same ID), NFS, by default, maps that ID. This means that if the user named mike (UID 110) on maple has an account on pine (mike, UID 110), he can use his own remotely mounted files on either computer from either computer. If a client user who is not set up on the server creates a file on the mounted NFS directory, the file is assigned to the remote client s UID and GID. (An ls -l on the server shows the UID of the owner.) Use the map_static option to identify a file that contains user mappings. The exports man page describes the map_static option, which enables you to create a file that contains new ID mappings so that you can remap client IDs into different IDs on the server. Exporting the Shared File Systems After you have added entries to your /etc/exports file, run the exportfs command to have those directories exported (made available to other computers on the network). Reboot your computer or restart the NFS service, and the exportfs command runs automatically to export your directories. If you want to export them immediately, run exportfs from the command line (as root). It s a good idea to run the exportfs command after you change the exports file. If any errors are in the file, exportfs identifies them for you. Here s an example of the exportfs command: # /usr/sbin/exportfs -a -v exporting maple:/pub exporting spruce:/pub exporting maple:/home exporting spruce:/home exporting *:/mnt/win The -a option indicates that all directories listed in /etc/exports should be exported. The -v option says to print verbose output. In this example, the /pub and /home directories from the local server are immediately available for mounting by those client computers that are named (maple and spruce). The /mnt/win directory is available to all client computers. Running the exportfs command temporarily makes your exported NFS directories available. To have your NFS directories available on an ongoing basis (that is, every time your system reboots), you need to set your nfs startup scripts to run at boot time. This is described in the next section. Tip Tip
Note: In case you are looking for affordable and reliable webhost to host and run your j2ee application check Vision J2ee Web Hosting services.

Leave a Reply