2021.06.13 00:00

NFS provides no encryption (fast) file sharing in local network.

Server

sudo nano /etc/exports

Add line

/full/path 192.168.1.0/24(rw,insecure,no_subtree_check,all_squash,anongid=0,anonuid=0)
  • all_squash,anongid=0,anonuid=0 is required to enable creating file regardless of the user (I think) without it file (with root owner?) cannot be copied

Then

sudo exportfs -ra  # Apply change
showmount -e 192.168.1.2  # Check mounts

Client

sudo apt install nfs-common
sudo mkdir /mnt/mounting_folder
sudo mount -o v3 192.168.1.2:/full/path /mnt/mounting_folder

To retain the change after reboot, put in fstab

sudo nano /etc/fstab

Add line

192.168.1.2:/full/path /mnt/mounting_folder nfs defaults 0 0


blog comments powered by Disqus