Skip to main content
added 633 characters in body
Source Link
user3188445
  • 5.6k
  • 4
  • 25
  • 41

Don't run sshfs with sudo. If you do that, ssh will consider that the file system belongs to root. Run it as yourself, then you will be able to write to the files.

clarification

When running without sudo, you need to mount on your own directory, since you probably can't write to /mnt. So here is an example of how to use sshfs once you have added user_allow_other to /etc/fuse.conf:

$ cd # make sure you are in home directory $ mkdir mnt # create empty directory $ sshfs server.com: mnt # mount my home directory on server.com on ./mnt $ ls mnt [contents of home directory on server] $ touch mnt/new_file # no problem creating a new file $ fusermount -u mnt # unmount file system $ rmdir mnt 

Don't run sshfs with sudo. If you do that, ssh will consider that the file system belongs to root. Run it as yourself, then you will be able to write to the files.

Don't run sshfs with sudo. If you do that, ssh will consider that the file system belongs to root. Run it as yourself, then you will be able to write to the files.

clarification

When running without sudo, you need to mount on your own directory, since you probably can't write to /mnt. So here is an example of how to use sshfs once you have added user_allow_other to /etc/fuse.conf:

$ cd # make sure you are in home directory $ mkdir mnt # create empty directory $ sshfs server.com: mnt # mount my home directory on server.com on ./mnt $ ls mnt [contents of home directory on server] $ touch mnt/new_file # no problem creating a new file $ fusermount -u mnt # unmount file system $ rmdir mnt 
Source Link
user3188445
  • 5.6k
  • 4
  • 25
  • 41

Don't run sshfs with sudo. If you do that, ssh will consider that the file system belongs to root. Run it as yourself, then you will be able to write to the files.