Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can read, can create, cannot modify files. #146

Open
oXwvdrbbj8S4wo9k8lSN opened this issue Jan 29, 2020 · 1 comment
Open

Can read, can create, cannot modify files. #146

oXwvdrbbj8S4wo9k8lSN opened this issue Jan 29, 2020 · 1 comment

Comments

@oXwvdrbbj8S4wo9k8lSN
Copy link

I have been struggling for a long time to mount a linux file share on our company's windows machines. Using sshfs-win, for the first time, I was able to mount a folder at all. So, there's light at the end... Thanks!
However, there's a catch: I cannot modify any existing files. I can access all folders, open files, even create new files but every time I try to edit an existing file, I get: Permission denied.

My setup is:
Windows 10 Enterprise with SSHFS-Win v3.5.20024 and WinFsp v1.5.20002
and an Ubuntu server running 16.04.6

What I tried so far:
[In the commands, I will replace my actual user name on the remote linux machine by linux_user_name, on the local windows machine by win_user_name, the domain of the windows machine by win_domain and the address of the linux machine by linux_address.]

  • I tried to mount the folder directly via the file explorer menu (add network drive) with this connection string:
    \sshfs.r\linux_user_name@linux_address\home\linux_user_name\
  • billziss-gh suggested in another similar issue to explicitly specify the domain and user name of the windows user like this:
    \sshfs.r\win_domain+win_user_name=linux_user_name@linux_address\home\linux_user_name

At this point I ran out of ideas to modify the connection string and tried the lower levels. However, with the sshfs.exe I could not figure out a way to create a connection at all. Every time I tried it, e.g. with the line "sshfs.exe linux_user_name@linux_address X:" I got "read: Connection reset by peer"

I am pretty sure that the problem is located somewhere on the windows side. Using a docker container (running Ubuntu) on the windows machine, I can mount the remote folder via "sshfs linux_user_name@linux_address:/home/linux_user_name mount_point" without problems and I have full access to the files. However, I need this access directly in Windows.

Does anybody have any ideas on what else to try? Or maybe what I do wrong when trying to use sshfs.exe directly?

@WBTMagnum
Copy link

At this point I ran out of ideas to modify the connection string and tried the lower levels. However, with the sshfs.exe I could not figure out a way to create a connection at all. Every time I tried it, e.g. with the line "sshfs.exe linux_user_name@linux_address X:" I got "read: Connection reset by peer"

I also had the read: Connection reset by peer problem. It's because sshfs.exe calls the system's ssh.exe and not the one bundled with sshfs-win.

To solve this, you can set the PATH environment variable before calling sshfs, e.g.

set PATH=C:\Program Files\SSHFS-Win\bin
sshfs.exe -f user@host: z:

See #95 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants