Changes

Jump to: navigation, search

OPS535-lab-nfs

2,205 bytes added, 19:49, 3 September 2019
m
Adding instructions to investigation 1
==Investigation 1: NFS Server Setup==
Perform the following steps on vm2:
<ol>
<li>Login to your machine as a regular user and enter the following command
su -</li>
<li>Enter the command
rpcinfo -p </li>
<li>Study the output and make notes of the first few lines. You should see two lines that end with the word "portmapper". If you don't, there is something wrong with your system, your system will not be able to provide NFS service. Ask for help if this is the case.</li>
<li>You should also see a line or two (or even more) that contains the word "nfs". If you don't, NFS is not running. If NFS is not running, you can start up NFS with the command:
systemctl start nfs-server</li>
<li>Create a directory named "/nfs-pub". Enter the command:
mkdir /nfs-pub</li>
<li>Change the file permission on "/nfs-pub" so everyone can read/write/list. Enter the command:
chmod 777 /nfs-pubDouble check the file permission with the ls -l command.</li>
<li>To set the sticky bit on the directory "/nfs-pub" , use the command
chmod +t /nfs-pub</li>
<li>Edit your /etc/exports file and insert the following lines:
/nfs-pub ip-of-vm1(rw,root_squash)
/nfs-pub ip-of-vm3(rw,root_squash)
"ip-of-vm1" should be replaced by the actual IP address of vm1 (VM1),and "ip-of-vm3" should be replaced by the actual IP address of vm3 (VM3).</li>
<li>Enter the command
exportfs -a
to tell your NFS server to re-read the configuration file (/etc/exports) and take the appropriate action, i.e. to export the directory /nfs-pub to the specific host.</li>
<li>Enter the command
showmount -e
Make notes of the output and consult the man page of showmount to find out the purpose of this command.</li>
<li>Use the command "exit" to leave the super user shell and switch back to the regular user shell.
Enter the command
id
to confirm your user id. Write down your user name, user ID and group ID.</li>
<li>Copy the file /etc/passwd into directory /nfs-pub as passwd.S. Enter the command
cp /etc/passwd /nfs-pub/passwd.S</li>
<li>Finally, confirm the file copying with the "ls -l" command and make notes of the output.</li>
<li>Modify the firewall on your server to allow incoming nfs traffic in your internal zone. Make sure this change persists past reboot.</li>
==Investigation 2: File ownership of new files created on NFS shares==
932
edits

Navigation menu