Open main menu

CDOT Wiki β

Changes

OPS535-lab-nfs

1,770 bytes added, 13:49, 4 September 2019
m
Investigation 2: File ownership of new files created on NFS shares: - Adding content to Investigation 2
==Investigation 2: File ownership of new files created on NFS shares==
Perform the following steps on VM1 as root:
<ol>
<li>
Enter the command
<source>cat /proc/filesystems</source>
Make notes of the output. You should see a list of file systems supported on your system. If "nfs" is missing from this list, your Linux kernel does not have NFS support compiled in.
However, it is possible that your kernel do support NFS via kernel module. Try the command
<source>modprobe nfs</source>
and make notes of the output from the above command. If it indicates that the nfs module has been loaded successfully, try the '''cat /proc/filesystems''' command again.</li>
<li>Create the directory /nfs-mnt. We will use this as the mount point for the remote directory.</li>
<li>Use the mount command to attach the remote directory ('''/nfs-pub''' from vm2) into the local mount point ('''/nfs-mnt''')</li>
<li>Use commands like mount or df to chech that the mount command executed successfully (that is, that VM2's '''/nfs-pub''' is now being treated as part of the local filesystem).</li>
<li>Confirm that you can access the contents of /nfs-mnt. They should be identical to VM2's '''/nfs-pub''' (because it IS VM2's '''/nfsp-pub'''). Note the owner and the group owner of the file passwd.S.</li>
<li>Still on VM1, copy the file '''/etc/passwd''' into the '''/nfs-mnt''' directory. Name the copy '''passwd.A.root'''.</li>
<li>Confirm that the file copied correctly. Again, make note of the owner and group owner of the file.</li>
<li>Switch to being a regular ('''non-root''') user and copy the file '''/etc/passwd''' into the '''/nfs-mnt''' directory again, this time naming the copy '''passwd.A.user'''. Again, make note of the owner and group owner of the file. Note how it differs from the ownership of the file created as root.</li>
</ol>
==Investigation 3: File creation permission and user name mapping on NFS shares==
932
edits