# install basic software needed to mount nfsĪpt-get install nfs-common # on Debian 8 and earlierġ92.:/DATA /mnt/DATA nfs rw,rsize=32768,wsize=32768,hard,intr,async,nodev,nosuid 0 0 To mount a NFS share on boot you need to specify it in /etc/fstab (/etc/init.d/rc.local -> script did not work for me in debian-jessie) # tested with Debian 8 Linux monitor all logs in real time ? – follow all – show changes to log files under /var/log If there are problems, it might be usefull to run this script (on server and client, while trying to mount nfs share), to see what might be the problem Setup the nfs-client: hostnamectl # tested on (server) another/path/on/server/to/share2đ92.168.122.247/0 *(rw,sync,no_subtree_check)Įxportfs -ra # systemctl restart nfs-kernel-server path/on/server/to/folder/to/share1đ92.168.122.72/0 *(rw,sync,no_subtree_check) # comment what this share is about (and who are the clients that want access?) # comment what this share is about (and who are the clients that want access?) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) Vim /etc/exports # /etc/exports: the access control list for filesystems which may be exported
Su - root apt update apt install nfs-kernel-server Operating System: Debian GNU/Linux 11 (bullseye) – security setup the nfs-server: hostnamectl # tested on (server) It might be okay to be used ssh tunneled but it shall not be used or active in untrusted environments. This means: nfs is only for trusted (lan) networks. NFS does not ask for passwords, instead on the server in /etc/exports is defined what client (identified by ip-address) may access what folder. It allows for fast, seamless sharing of files across a network.” ( src) “The Network File System (NFS) was developed to allow machines to mount a disk partition on a remote machine as if it were a local disk. Nfs is to GNU-Linux what smb is to Windows: sharing dirs & files
GNU Linux (Debian) – how to setup nfs server and mount nfs share