1

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 pi@bbqpi.local:/var/www/html/ "/Users/me/Documents/Raspberry Pi/pimount"
$ sshfs pi@bbqpi.local:/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?

  • I don't know the answer, but if I try this on my system group 33 www-data on the pi displays as _appstore on the Mac. sshfs normally maps UID/GID to the logged user i.e. pi – Milliways Oct 24 '18 at 1:27
  • I fixed the problem. I had a command parameter backwards. The first command should be this instead: $ sudo usermod -a -G www-data pi – Alex Oct 29 '18 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.