Using the Network Interface
Sharing Filesystems
8-14
SPARCbook Portable Workstation User Guide
Exporting local filesystems
To allow others to access parts of the filesystem on your SPARCbook
you export the filesystems you wish to share. To make the whole
filesystem available, you would specify the root directory, but normally
you would only allow access to specific files or directories.
ò
Configuring the /etc/exports file
The
/etc/exports
file controls access by other hosts to the local
filesystem and consists of a number of lines containing the mount point
followed by one or more hostnames, identifying the hosts which may
access the exported filesystem. This file will not exist if you have not
previously used NFS to export files but can be created and edited with
a text editor such as
vi
. Each line has the following syntax:
pathname -option,option…
Where:
pathname
is the file or directory to be exported
option
specifies the type of access to be given, such as
ro
for
read-only or
rw
for read-write access.
For example, the
/etc/exports
file on merlot attached to the network
shown in Figure 8-4 might have the following lines:
/usr/anywork-rw=medoc, access=chianti:burgundy, anon=-1
/usr/anybrowse-ro
In this example, medoc has read-write access to the directory
/usr/anywork
; chianti and burgundy have read-only access; and the
anon=-1
entry prevents any anonymous accesses. The second entry
allows anonymous read-only access to
/usr/anybrowse
.
ò
Enabling file sharing
To allow these directories to be shared, you can either reboot the
operating system (but not with Save and Resume) or use the following
commands:
# nfsd 8
start 8 NFS daemons
# exportfs -a
export the specified directories
# rpc.mountd
start the mount daemon
S3UG4_Book Page 14 Friday, August 8, 1997 11:37 am