SSHFS 2.4 works, but permissions problems when used with Macfusion

5,233 views
Skip to first unread message

Advrk Aplmrkt

unread,
Jul 12, 2012, 1:59:13 PM7/12/12
to osxfus...@googlegroups.com
Hello again,

I finally have a better understanding of my Macfusion permissions issues now, and I hope someone can help me diagnose this problem?

1. I managed to obtain an updated patch from the author of this post for SSHFS 2.4. This patch adds options to force a certain set of permissions for files written to a SSHFS volume. E.g. I tell SSHFS to set all files I write to the volume to 774. Thanks to the help from this list, I was able to compile a statically linked Universal Binary of this patched SSHFS.

2. I tested mounting this remote SSHFS volume from the Terminal (in Mac OS X 10.5 (PPC), 10.6 (Intel i386), and 10.7 (Intel x86_64)!), and with the options "-o remote_dmask=774,remote_fmask=774,defer_permissions" I was able to create, delete, read, edit, and save files/folders from the volume. This is a good start!

3. However, when I moved this patched SSHFS into the Macfusion application, and renaming it to replace the stock sshfs-static, problems occur. On the Mac OS X 10.5 machine, the volume mounts, but shows it has "zero bytes" free space, and I was unable to upload any files to it! (opening, editing, and saving existing files seemed fine)

4. On the Mac OS X 10.6 machine, I got this error when I try to mount the volume: "Could not mount filesystem: Authentication failed." Looks like this is the part of the log that shows the problem:

(SSHServerFS, [volume name], 2012-07-12 13:28:35) debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/[my user]/.ssh/id_rsa
debug1: Trying private key: /Users/[my user]/.ssh/id_dsa
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: Device not configured
(SSHServerFS, [volume name], 2012-07-12 13:28:36) debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

I don't think this is a Keychan problem because I don't save any credentials on this machine. Using the stock SSHFS that came with Macfusion, nor changing between 32-bit and 64-bit modes, were able to solve the problem.

5. On the Mac OS X 10.7 machine, the volume was mounted successfully, and most operations worked (such as creating, deleting, and modifying most files). However, there are some strange permissions issues. For example, Micro$oft Office 2011 applications like Word or Excel insists on opening documents on the volume as read-only, and complains about no permissions when trying to save to, or overwrite a file. Again using the stock SSHFS that came with Macfusion didn't help.

In summary, mounting a SSHFS volume from the commandline (whether it is the stock SSHFS from Github or the patched one) seems to work fine. But when used with Macfusion, weird problems happen.

I hope this is a more accurate and specific description of my issue. Has anyone else experienced something similar, or might have suggestions for troubleshooting this? Thank you!!!

P.S. Would it help if I try to remove ALL traces of SSHFS and Macfusion from a machine so I can start from scratch? If so, how do I do this cleanly?

Qida Ching

unread,
Jul 27, 2012, 4:37:05 AM7/27/12
to osxfus...@googlegroups.com
Hi,

I am also facing problem with macfusion for password authentications. It shows as per debug1: read_passphrase: can't open /dev/tty: Device not configured, which i am totally surprised. 

So my open workaround is to use rsa public/private key authentication for macfusion instead:

1. Generate a private key from my host. (ie. testkey.key)
2. Create a file at  .ssh/config   (ie : vim ~/.ssh/config)
3. Copy the private key from the host server to the mac, change permission to 600 ( chmod 600 /Users/admin/Desktop/pkey/priv1.key)

4. Add the following 4 lines in the config file. - depending on your where you put the file
Host 192.168.1.xx
HostName 192.168.1.xx
User admin
IdentityFile /Users/admin/Desktop/pkey/priv1.key

Once that is done. Confirm you can ssh -passwordless to the server box.

Then it should work with macfusion without problem. (tested on mountain lion 10.8)

ssh ad...@192.168.1.xx 

If anyone have any idea on how to setup sshfs using password on macfusion please let us know.

Regards - Qida

Advrk Aplmrkt

unread,
Aug 1, 2012, 11:25:41 AM8/1/12
to osxfus...@googlegroups.com
Hello,

Thanks for the tip. The SSH server I'm trying to access is having
issues with public key authentication (unrelated to SSHFS or
MacFusion), I will try your solution once that issue is resolved.

However, in the meantime I would still love to hear ideas on how to
solve the problem with password authentication, where you would get:

debug1: read_passphrase: can't open /dev/tty: Device not configured

Also, on computers that can mount my SSHFS volume, there is still the
strange brhaviour where Microsoft Office documents opens up as
read-only, while other files work fine read-write... any ideas?

Qida Ching

unread,
Aug 1, 2012, 10:15:41 PM8/1/12
to osxfus...@googlegroups.com
Hi,

To set permissions you could try the link: http://jann.is/daily/archives/757-ExtraAdvanced-options-for-MacFuseMacFusion.html

To me it still works for mountain lion, and gives me correct permission for the remote files based on the login name.

I try to upgrade everything i could for mountain lion, including patching osxfuse to 2.4.2 and macfusion to 2.0.4.

Although the error above still persist (debug1: read_passphrase: can't open /dev/tty: Device not configured) 

but now password authentication works!

Hope that solve your problem.

Advrk Aplmrkt

unread,
Aug 2, 2012, 4:51:23 PM8/2/12
to osxfus...@googlegroups.com
Hello,

Thanks for the suggestion. I tried the suggested options in your linked post:

-o idmap=user -o uid=501 -o gid=20

(yes I did make sure the UID and GID are correct)

However, I can't write any file to the SSHFS volume because there
would be an "error 36".

In my original post, I said I used the "-o defer_permissions" option,
but I have problems with that, too. I tried different combinations of
options on different versions of OS X (10.5 through 10.7) and got
different results in each! The original post detailing my problems is
here:

https://groups.google.com/d/msg/osxfuse-group/1Cuk_aB4Qgs/nYH8Cva2kJQJ

And a bit more here:

https://groups.google.com/d/msg/osxfuse-group/EaE3FrV1VoU/yISmIHsfLVgJ

You can see in my two posts that even in the best case on a OS X 10.7
machine, most files can be read and written to, but Microsoft Office
documents insists on opening as read-only. In other versions like 10.6
and 10.5, I can barely write a file onto the volume...

I am really baffled, and would appreciate any ideas! Thanks!

Qida Ching

unread,
Aug 2, 2012, 9:48:44 PM8/2/12
to osxfus...@googlegroups.com
Hi,

In the past i used to have problem with permissions when i mount a sshfs that has different login name as the account on my mac.

But it was resolved by giving the correct permission as per below, or tell macosx to defer permission as per below.

Maybe the permission issue lies with your ssh server's user? - try double check the permission of the sshfs by ssh in from terminal

I tested on sshdroidpro (on my android device) and a standard centos linux server, 

macfusion shows the correct permission, (Not all files are read/write, but are given the correct permission as thou i login locally)

Regards - Qida

Denis Bochko

unread,
Nov 3, 2012, 8:45:48 PM11/3/12
to osxfus...@googlegroups.com
Hi, I just upgraded to mountain lion from leopard and my macfusion stopped working, and I am reading it is due to macfusion inability to pass password to ssh library

are you saying that you have macfusion working and being able to connect to ssh servers using username/password? are you just running osxfuse and macfusion?
I need to get this thing fixed and would really appreciate any information. running osxfuse 2.5.4 and macfusion 2.0.4

thanks
Reply all
Reply to author
Forward
0 new messages