5

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 [email protected]            # <--- SSH to remote system works! See below.
[email protected] % 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 .
[email protected] % 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 [email protected]:remoteDir /mnt/share1
[email protected]'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?

2 Answers 2

5

Check out the config options https://code.google.com/p/macfuse/wiki/OPTIONS

I added 'allow_other' and it worked for me. Here is my connect string:

sshfs -p 22 [email protected]:/home/user/ ~/RemoteHome -oauto_cache,reconnect,defer_permissions,negative_vncache,allow_other,volname=RemoteHome
1
  • sshfs -p 22 [email protected]:/home/user/ ~/RemoteHome -o volname=RemoteHome Above worked for me. Other options weren't required.
    – Viraths
    Apr 7, 2021 at 4:57
2

Unless you explicitly want to share that folder with other users of your system, you can also call it without sudo; that way you can also omit allow_other option - the user that invokes the command (you) will have exclusive access (apart from root of course).

You must log in to answer this question.

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