The Wiki has moved to new hardware, and the old server died.

Welcome to the Slackware Documentation Project


This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:network_services:nfs-quick_and_dirty_setup [2014/01/21 03:57 (UTC)]
arfon Added title
howtos:network_services:nfs-quick_and_dirty_setup [2019/10/08 04:38 (UTC)]
bassmadrigal Fix filename typo per Skaendo on LQ forum
Line 2: Line 2:
 ====== NFS - Quick and Dirty Setup ====== ====== NFS - Quick and Dirty Setup ======
-Known to work on Slackware 14 14.1 \\ +Known to work on Slackware 1414.1 and 14.2 \\ 
 ====== Assumptions ====== ====== Assumptions ======
Line 19: Line 19:
 <​code>​vi /​etc/​exports</​code>​ <​code>​vi /​etc/​exports</​code>​
 add: \\  add: \\ 
-<code>/​nfs_share​24(rw,​sync,​no_subtree_check)</​code>+<file sh /​etc/​exports>/​nfs_share​24(rw,​sync,​no_subtree_check)</​file>
 Start the NFS and RPC daemons \\  Start the NFS and RPC daemons \\ 
Line 51: Line 51:
 <​code>​ vi /​etc/​fstab</​code>​ <​code>​ vi /​etc/​fstab</​code>​
 add: \\  add: \\ 
-<code>​my.nfs.server:/​nfs_share /​mnt/​nfs_share nfs rw,defaults 0 0</code>+<file sh /etc/fstab>​my.nfs.server:/​nfs_share /​mnt/​nfs_share nfs rw,defaults 0 0</file>
Line 57: Line 57:
 <​code>​ vi /​etc/​fstab</​code>​ <​code>​ vi /​etc/​fstab</​code>​
 add: \\  add: \\ 
-<code>​my.nfs.server:/​nfs_share /​mnt/​nfs_share nfs rw,noauto 0 0</code>+<file sh /etc/fstab>​my.nfs.server:/​nfs_share /​mnt/​nfs_share nfs rw,noauto 0 0</file>
 then when you want to mount, just run: \\  then when you want to mount, just run: \\ 
 <​code>​mount /​mnt/​nfs_share</​code>​ <​code>​mount /​mnt/​nfs_share</​code>​
Line 72: Line 72:
 chmod 755 /​etc/​rc.d/​rc.rpc chmod 755 /​etc/​rc.d/​rc.rpc
 /​etc/​rc.d/​rc.nfsd start /​etc/​rc.d/​rc.nfsd start
-/​etc/​rc.d/​rpc start+/etc/rc.d/rc.rpc start
 exportfs -a</​code>​ exportfs -a</​code>​
Line 93: Line 93:
 3) Remount the NFS share 3) Remount the NFS share
 +4) No Root Squash:
 +There are many options for NFS and I want to keep this article short but effective so I am leaving out many of the various configuration items that you could do. However there is one option that is worth mentioning, **no_root_squash**. By default NFS will downgrade any files created with the root permissions to the nobody user. This is a security feature that prevents privileges from being shared unless specifically requested.
 +If I create a file as the root user on the client on the NFS share, by default that file is owned by the nobody user.
 + ​root@client:​~#​ touch /​shared/​nfs1/​file2 ​
 + ​root@server:/​nfs#​ ls -la file2
 + ​-rw-r--r-- 1 nobody nogroup 0 Nov 18 18:06 file2
 +Sometimes it is important to share files that are owned as root with the proper permissions,​ in these cases this can be done by simply adding the **no_root_squash** attribute to the **/​etc/​exports** configuration.
- +**Edit the /​etc/​exports file:** 
 ====== Sources ====== ====== Sources ======
 <!-- If you are copying information from another source, then specify that source --> <!-- If you are copying information from another source, then specify that source -->

In Other Languages
QR Code
QR Code howtos:network_services:nfs-quick_and_dirty_setup (generated for current page)