Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
howtos:network_services:nfs-quick_and_dirty_setup [2014/01/22 04:48 (UTC)] arfon Just learned about the <file> tag... had to add |
howtos:network_services:nfs-quick_and_dirty_setup [2019/10/08 04:38 (UTC)] (current) 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 14, 14.1 and 14.2 \\ |
====== Assumptions ====== | ====== Assumptions ====== | ||
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. | ||
+ | <code> | ||
+ | root@client:~# touch /shared/nfs1/file2 | ||
+ | root@server:/nfs# ls -la file2 | ||
+ | -rw-r--r-- 1 nobody nogroup 0 Nov 18 18:06 file2 | ||
+ | </code> | ||
+ | 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:** | |
+ | <code> | ||
+ | /nfs_share 192.168.1.1/24(rw,sync,no_root_squash) | ||
+ | </code> | ||
====== 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 --> |