10

I'm running Max OSX 10.9.3 and I'm trying to setup an SSHFS file-share between my MacBook Pro and a remote file system. However, when I try to do it, it doesn't work.

Strangely enough, it makes the target directory disappear. Has anyone else seen this happen? Is it a bug?

First see that I can ssh normally into the target machine:

% ssh remoteuser@XXX.XXX.XXX.XXX            # <--- SSH to remote system works! See below.
remoteuser@XXX.XXX.XXX.XXX % ls -altr remoteDir
total 8
drwxr-xr-x 26 remoteuser remoteuser 4096 Jun 22 01:00 ..
drwxrwxrwx  2 remoteuser remoteuser 4096 Jun 22 01:08 .
remoteuser@XXX.XXX.XXX.XXX % exit
%                                           # <--- Logged out of remote system

Next, I create a directory locally and verify it was created:

% pwd
/mnt

% ls
total 0
drwxr-xr-x  31 root  admin  1122 Jun 18 18:34 ../
drwxr-xr-x   2 root  admin    68 Jun 23 08:11 ./

% sudo mkdir share1 
% ls
drwxr-xr-x  31 root  admin  1122 Jun 18 18:34 ../
drwxr-xr-x   4 root  admin   136 Jun 23 08:50 ./
drwxr-xr-x   2 root  admin    68 Jun 23 08:50 share/

Now I try to setup the SSHFS share:

% sudo sshfs remoteuser@XXX.XXX.XXX.XXX:remoteDir /mnt/share1
remoteuser@XXX.XXX.XXX.XXX's password:
%

Ok. It seems to have worked. No errors. So let's see the share we created, shall we?

% ls
ls: share1: No such file or directory
total 0
drwxr-xr-x  31 root  admin  1122 Jun 18 18:34 ../
drwxr-xr-x   3 root  admin   102 Jun 23 08:12 ./

What? Not only is the File Sharing not working, but the share1 directory seems to have vanished! (Although the file system seems to know it is missing, which is weird).

Where did /mnt/share1 go and how do I setup this SSHFS?

13

On OSX you should run the mounting command as your own regular user, not root.

sshfs user@host:/ ~/sshfs -oauto_cache,reconnect,defer_permissions,noappledouble,negative_vncache,volname=MySSHFSMount
1

This is very late, but I saw it because I googled the same issue. The problem seems to be that your system still thinks that the directory is mounted by the sshfs connection. What I did to solve the problem is use the following command in the Terminal umount -f /path/to/the/vanishing/directory.

Once you do that, your directory should be freed, and then you can go to your desktop and hold control and "right" click (two finger click) the finder icon, and choose relaunch. The directories will pop back up on your desktop.

0

Try to enable some of the options mentioned in https://code.google.com/p/macfuse/wiki/OPTIONS or to mount the volume somewhere else:

mkdir /tmp/sshfs
sshfs user@host -o reconnect,local,allow_other,defer_permissions /tmp/sshfs

OS X doesn't have /mnt/, but you can just mount the sshfs volume anywhere.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .