Difference between revisions of "NFS"
Jump to navigation
Jump to search
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | https://linuxize.com/post/how-to-install-and-configure-an-nfs-server-on-ubuntu-20-04/ | ||
+ | |||
+ | # Secure | ||
+ | http://fullyautolinux.blogspot.com/2015/11/nfs-norootsquash-and-suid-basic-nfs.html?m=1 | ||
+ | |||
# Client Access | # Client Access | ||
Line 89: | Line 94: | ||
``` | ``` | ||
− | Windows https://superuser.com/questions/372490/error-mounting-arch-linux-nfs-share-on-windows-7-ultimate | + | # Windows |
+ | - https://superuser.com/questions/372490/error-mounting-arch-linux-nfs-share-on-windows-7-ultimate | ||
+ | - https://docs.microsoft.com/en-us/powershell/module/nfs/new-nfsshare?view=win10-ps | ||
+ | |||
+ | Powershell | ||
+ | ``` | ||
+ | net use y: \\10.x.x.x\nfs\a | ||
+ | ``` | ||
+ | |||
+ | cmd | ||
``` | ``` | ||
− | |||
mount \10.1.1.1\nfs\a z: | mount \10.1.1.1\nfs\a z: | ||
mount -o anon \\192.168.1.99\data\authorized Z: | mount -o anon \\192.168.1.99\data\authorized Z: | ||
``` | ``` |
Latest revision as of 02:46, 17 July 2021
https://linuxize.com/post/how-to-install-and-configure-an-nfs-server-on-ubuntu-20-04/
Secure
http://fullyautolinux.blogspot.com/2015/11/nfs-norootsquash-and-suid-basic-nfs.html?m=1
Client Access
MacOS NFS
mkdir -p ~/nas/shared sudo mount nas:/nas/shared ~/nas/shared
- https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-18-04
- https://www.cyberciti.biz/faq/apple-mac-osx-nfs-mount-command-tutorial/
Ubuntu/Debian
sudo apt install nfs-common sudo apt install cifs-utils # for cifs support mkdir ~/nas/shared sudo mount nas:/nas/shared ~/nas/shared
permanent using /etc/fstab
sudo mkdir -p /nas/shared chmod 0777 /nas/shared nas:/nas/shared /nas/shared nfs
Install
sudo apt-get update sudo apt-get install nfs-kernel-server
sudo mkdir -p /nas/shared sudo chown nobody:nogroup /nas/shared sudo chmod 777 /nas/shared
sudo nano /etc/exports /nas/shared 10.x.x.0/24(rw,sync,no_subtree_check,insecure) # /nas/shared clientIP(rw,sync,no_subtree_check,insecure)
enable lockd https://debian-handbook.info/browse/squeeze/sect.nfs-file-server.html
/etc/default/nfs-common file
NEED_LOCKD=yes
export
sudo exportfs -a
firewall
sudo ufw allow ssh sudo ufw enable sudo ufw allow from 10.x.x.0/24 to any port nfs
LXD permission issues with NFS
See https://github.com/lxc/lxd/issues/3989 or https://github.com/lxc/lxd/issues/2703
lxc config set privileged_container_name security.privileged true lxc config set nas raw.apparmor "mount fstype=rpc_pipefs, mount fstype=nfsd," lxc restart privileged_container_name
lxc launch ubuntu:18.04 nfs -c security.privileged=true -c raw.apparmor="mount fstype=rpc_pipefs, mount fstype=nfsd,"
Windows
- https://superuser.com/questions/372490/error-mounting-arch-linux-nfs-share-on-windows-7-ultimate
- https://docs.microsoft.com/en-us/powershell/module/nfs/new-nfsshare?view=win10-ps
Powershell
net use y: \\10.x.x.x\nfs\a
cmd
mount \10.1.1.1\nfs\a z: mount -o anon \\192.168.1.99\data\authorized Z: