Share directories with NFS in debian
The NFS (Network File System) technology has been a key part of file sharing in network environments. Developed by Sun Microsystems, NFS allows Unix and Linux operating systems to share file resources transparently, providing access to remote files and directories as if they were stored locally.
1.Installation and NFS configuration
We installed the nfs-kernel-server package.
We will create the directory we are going to share and change the owners and permissions of it:
In the file etc / exports we will indicate what our directory is and their respective permissions:
- ro * *: directory reading only permission
- rw * *: reading and writing permission of the directory
- subtree _ check * *: specifies subdirectories verification
- no _ subtree _ check: * * prevents subdirectories verification
- sync: * * Write all changes to the disk before applying it
- Async: * * ignores synchronization verification to improve speed
We apply the changes and restart the service:
2.Visualize it on a debian client
We will install the following package:
We put it on our client:
We can also do this permanently in the fstab:
We can view the content:
Let’s create a file and check that it has been created on the server:
3 Visualization on Windows
We download the NFS client feature:
We map the network unit:
We created a file remotely and we checked that it was created.
We also checked on the server: