Edit exports setting for nfs on your host server and restart NFS server.
sudo apt-get install nfs-kernel-server sudo vim /etc/exports /nfsroot 192.168.0.0/24(rw,no_subtree_check,no_root_squash,async,insecure) /home 192.168.0.0/24(rw,sync,no_subtree_check,no_root_squash) sudo /etc/init.d/nfs restart sudo service nfs-kernel-server restart
There are some permission options.
- no_root_squash
- Map requests from uid/gid 0 to the anonymous uid/gid. Note that this does not apply to any other uids that might be equally sensitive, such as user bin.
- root_squash
- Turn off root squashing. This option is mainly useful for diskless clients.
- all_squash
- Map all uids and gids to the anonymous user. Useful for NFS-exported public FTP directories, news spool directories, etc. The opposite option is no_all_squash, which is the default setting.
- anonuid and anongid
- These options explicitly set the uid and gid of the anonymous account. This option is primarily useful for PC/NFS clients, where you might want all requests appear to be from one user. As an example, consider the export entry for /home/joe in the example section below, which maps all requests to uid 150 (which is supposedly that of user joe).
Examples:
/home 192.168.0.1/24(rw,sync,no_subtree_check,all_squash,anonuid=3000,anongid=3000)
If you use all_squash option with anonuid and anongid, all remote your became the 1001 user and join the group 1001.
Edit fstab setting on your client server.
sudo apt-get install nfs-common sudo mount -t nfs -o nolock 192.168.0.1:/home /home
Then, fstab file in your client server will be:
sudo vim /etc/fstab # <file system> <mount point> <type> <options> <dump> <pass> 192.168.0.100:/nfsroot / nfs sync,ro,hard,intr,nolock 0 0 192.168.0.100:/home /home nfs sync,rw,hard,intr,nolock 0 2
NFS(Network File System) 기본 설정하기 (Ubuntu 14.04, 12.04)

![[Ubuntu] apt-get update error (403 Forbidden on nijel/phpmyadmin)](https://tech.sangron.com/wp-content/uploads/sites/2/2017/12/ubuntu_wallpaper_2-768x480.jpg)
![[C++] Google Test (GTest) Ubuntu에 적용하기](https://tech.sangron.com/wp-content/uploads/sites/2/2018/10/cpp_wallpaper-768x480.jpg)
![[Crypto Currency] Ubuntu에서 CCMiner로 Mining 시작하기](https://tech.sangron.com/wp-content/uploads/sites/2/2019/02/blank_500x500-768x480.jpg)
![[Python] Python 으로 Shell command 수행하기](https://tech.sangron.com/wp-content/uploads/sites/2/2018/02/python_wallpaper_3-768x480.jpg)