MacFUSE + sshfs + underlying SMB mount = fail

One of the things I’m trying to do is mount remote filesystems on my Mac using MacFUSE and sshfs. In short, the idea is you use ssh/sftp to connect to a remote system and “mount” its filesystem (using the SSH connection) so that it appears as a mounted volume on your local machine. In general, this works great; you only need SSH access to the remote host–not SMB, CIFS, or any other standard, but perhaps firewalled, network file sharing protocol.

But, what if the remote filesystem you want to mount is actually a mounted SMB share? You would think it should “just work,” right? It kind of does, sorta. But, only sorta.

I start out by using sshfs to mount the remote filesystem:

dossy@shiny:~$ sshfs foobar:/share x -o volname=x

Nothing surprising: this just works as you’d expect. I’m mounting the subdirectory /share on foobar to my local mountpoint named “x” as a Mac volume named “x”. Lets make sure we can write to it:

dossy@shiny:~$ cd x
dossy@shiny:~/x$ ls -la
total 8
drwxrwxrwx  1 root  wheel  4096 Sep 13 20:40 .
drwxrwxrwx  1 root  wheel     0 Sep 13 18:23 ..
dossy@shiny:~/x$ echo "This is a test." > test.txt
dossy@shiny:~/x$ cat test.txt
This is a test.

There, we can write to this remote filesystem just fine–this is great! But, this was all from the shell, what about from the Finder? Ahh, this is where things start to suck hard. I create a small test file called “suckage.txt” and try to copy it to the sshfs mount:

Copying a test file to my sshfs mount in Finder

Attempting this copy operation results in this error dialog:

Copy: The operation cannot be completed because you do not have sufficient privileges for some of the items.

Say what? I don’t have sufficient privileges? Finder, you’re crazy. Watch this:

dossy@shiny:~/x$ cp ~/Desktop/suckage.txt .
dossy@shiny:~/x$ ls -la
total 16
drwxrwxrwx   1 root   wheel     0 Sep 13 21:49 .
drwxr-xr-x+ 35 dossy  staff  1190 Sep 13 20:57 ..
-rw-rw-rw-   1 root   wheel    20 Sep 13 21:51 suckage.txt
-rw-rw-rw-   1 root   wheel    16 Sep 13 20:45 test.txt

Looks like I had privileges just fine–why couldn’t Finder copy the file? I suspect it has a lot to do with the crazy AppleDouble nonsense that Finder messes with, none of which happens when I just copy the files in a shell.

I’ve spent at least an hour playing Configuration Option Bingo (you know, when you try turning on and off all the various configuration options until you get the permutation that solves your problem, at which point you want to jump up and shout out “BINGO!”) … with no luck. I’ve tried “-o noappledouble” and the other obvious things. I’m now giving up and blogging this, hoping that someone out there has figured this out and might share their secret; I sure couldn’t turn up anything useful by Googling, that’s for sure.

Tags: , , , , , ,

Comments

  1. I am having the exact same problem and I’m still looking for a solution. Did anyone already figure this one out?

  2. Me too! :(

  3. I am using MacFuse 2.0.3 and had the same problem. I unchecked “Ignore Apple Double Files” under the Advanced tab, and I can now duplicate and copy. But I don’t know why, and I don’t want Apple Double crap all over my remote filesystem.

  4. Sorry, mean MacFusion 2.0.3.

Speak Your Mind

*