I have a Raspberry Pi with Raspberry Pi OS (ex Raspbian).
I wanted to share my home folder (/home/pi) with NFS. I'd like to access it also from my Windows 10 PC, reading and writing files as I was the "pi" user.
I launched the following commands:
$ sudo apt-get install nfs-kernel-server
$ id pi
uid=1000(pi) gid=1000(pi)
$ sudo nano /etc/exports
I added this line:
/home/pi *(rw,all_squash,insecure,async,no_subtree_check,anonuid=1000,anongid=1000)
And then:
$ sudo exportfs -ra
After installing the Windows NFS Client component, I was able to connect my RPi home folder as a network drive. I can create files. However, I cannot edit files.
E.g.: I created a test file under windows. I create a test file under linux.
pi@sigipi:~ $ echo hello > test_pi.txt
pi@sigipi:~ $ ls -l test_*
-rw-r--r-- 1 pi pi 6 apr 19 23:29 test_pi.txt
-rwxr-xr-x 1 pi pi 0 apr 19 23:29 test_windows.txt
Both files are now read only from Windows. I cannot edit them. (but I can delete them).
Only way to edit them is launching this:
sudo chmod -R a+rw test*
What am I missing?