BioRod
BioRod

Reputation: 549

Can't write to a file with sshfs

I'm trying to mount a directory from a remote machine to my laptop. Here is the command.

 sshfs user01:/home/user01/somedir /home/user02/mount -o allow_other -o rw

When I try to write a file, I get:

E212: Can't open file for writing

Here are the contents of /etc/fuse.conf

user_allow_other

The permission of the remote dir of /home/user01/somedir

-rw-r--r--  1 user01 users

I prefer not to change the permissions on the remote machine.

Upvotes: 4

Views: 5562

Answers (1)

BioRod
BioRod

Reputation: 549

Here is the command that worked.

 sshfs -o sftp_server="/usr/bin/sudo -u user01 /usr/libexec/sftp-server" you@<server>:/home/user01 /source/home_dir/mountpoint

Make sure on destination server usr/libexec/sftp-server is the correct path, or adjust.

Upvotes: 1

Related Questions