Open kourylape opened 7 years ago
Hey @ckylape: Thank you for the feedback. How did you install sshfs? Did you use brew or some other method? Is this the latest version of the software for your system? If not, you might try updating to the latest version and see if that makes a difference.
@uberhacker - I got it from https://osxfuse.github.io/ which was a few versions behind compared to the homebrew package, so I just tried the latest version of sshfs via brew and got the same results.
@ckylape: What happens if you try to mount in a directory other than /tmp (the default)? Try something like terminus mount my-site.env --dir=~/
.
Same. I've tried /tmp, /Volumes, and ~/mounts. It's also interesting because I've tested a similar sshfs
command on 5+ other sites and everything works fine. These SFTP servers range from AWS EC2, GoDaddy, WP Engine, and a QNAP NAS.
Update: @uberhacker It seems to be an issue with either my version of OSX or SSHFS. I just tried the same command on a Linux stack and it worked fine. I'm going to try checking on OSX 10.12 as well as SSHFS 2.4 on 10.11 (2.5+ seems to have major changes).
Yeah, you might have better luck with older versions. Do you have any trouble connecting to the same site environment using the Terminus Filer Plugin? If not, then the problem is most likely not ssh but rather fuse/sshfs specific.
@uberhacker It seems like it's an issue with Pantheon's servers and sshfs on OSX. I tried the following:
The plugin (or raw sshfs commands) did not work on any of those versions.
I did get it to work though after adding -o workaround=truncate
to sshs
. I will have to do some more testing, but it might also need the rename
workaround. I'm thinking that it's a server issue since the man sshfs
shows:
-o workaround=LIST
colon separated list of workarounds
none no workarounds enabled
all all workarounds enabled
[no]rename
fix renaming to existing file (default: off)
[no]nodelaysrv
set nodelay tcp flag in ssh (default: off)
[no]truncate
fix truncate for old servers (default: off)
[no]buflimit
fix buffer fillup bug in server (default: on)
My final command looks like:
sshfs -o IdentityFile=<PATH_TO_KEY>,allow_other,reconnect,workaround=truncate -p 2222 <ENV>.<SITE_UID>@appserver.<ENV>.<SITE_UID>.drush.in:code ~/
Nice find. I suppose it wouldn't hurt if you just used workaround=all
? Not sure why you would need the IdentityFile=...
option since the default is ~/.ssh/id_rsa
.
The IdentityFile
seems to required with older versions of sshfs (2.5 and lower - at least on OSX). The nodelaysrv
seems to slow down the connection IMO so the workaround=truncate:rename
seems a little better. Thanks for the feedback/help.
The environment mounts perfectly, but I cannot edit any of the files because of permission denied. Also the
-o IdentityFile=<path_to_key
seems to be required otherwise it prompts for your Pantheon account password.My setup:
I get permission denied when trying to edit files when using the plugin as well as:
I get Operation not supported on socket when trying to edit when using:
Oddly enough, when I use the following and edit a line or two:
It works and uploads fine, but
nano
, Atom, and PhpStorm have issues.