I am hosting a web server on my Raspberry Pi and I'd like to be able to edit the hosted files through sshfs on my MacBook. I have installed sshfs on my Pi and MacBook and have also installed FUSE for macOS on my MacBook.
The files on the web server are owned by www-data so that web users can interact with the site.
I have tried these commands on the Pi:
$ sudo usermod -a -G pi www-data $ sudo chmod -R g+w /var/www/html
And these on my MacBook:
$ sshfs email@example.com:/var/www/html/ "/Users/me/Documents/Raspberry Pi/pimount" $ sshfs firstname.lastname@example.org:/var/www/html/ "/Users/me/Documents/Raspberry Pi/pimount" -o defer_permissions,allow_other
But each time I can mount the folder, open the files, but if I try to save any changes I get "Permission denied." How can I save changes to files that I am mounting through sshfs?