# SSHFS doesn't work under Parallels Desktop 8 for Mac



## pietrasm (Dec 20, 2012)

Hello,

This is my first post here, therefore I would like to say hi to everyone.

There is an issue. I've installed sysutils/fusefs-sshfs under FreeBSD 9.0 running on Parallels Desktop 8 for Mac. Unfortunately, it doesn't work. I get something like this:

```
%mkdir mount-point
%sshfs 192.168.0.128:/Users/pietrasm/Dropbox/uni/FinalProject/src/ mount-point/
Password:
%ls mount-point 
ls: mount-point: Bad file descriptor
%uname -a
FreeBSD MacBook-FreeBSD 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 02:52:29 UTC 2012
root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64
%
```
I've tried to install it on the different system running on a real machine and it worked.

Is there anything I can do with it?

Thanks.


----------



## gkontos (Dec 20, 2012)

I have very bad experience with fusefs/-sshfs in FreeBSD. It works up to the point where you try to transfer large files. Then it suddenly looses the mount point.

My suggestion is to try another file sharing protocol.


----------



## pietrasm (Dec 20, 2012)

gkontos said:
			
		

> I have very bad experience with fusefs/-sshfs in FreeBSD. It works up to the point where you try to transfer large files. Then it suddenly looses the mount point.
> 
> My suggestion is to try another file sharing protocol.


Is there anything you can suggest to use? I need to share files between Mac and FreeBSD running on VM. I am going to write some code on Mac and compile it and test on FreeBSD. I am not going to transfer large files. The most important for me is an easy setup. I would prefer to do not install any extra software on the Mac.

Is there any way to mount AFP share under FreeBSD? I know that net/netatalk3 can act as a server, but not as a client.

Thanks.


----------



## gkontos (Dec 21, 2012)

pietrasm said:
			
		

> Is there anything you can suggest to use? I need to share files between Mac and FreeBSD running on VM. I am going to write some code on Mac and compile it and test on FreeBSD. I am not going to transfer large files. The most important for me is an easy setup. I would prefer to do not install any extra software on the Mac.
> 
> Is there any way to mount AFP share under FreeBSD? I know that net/netatalk3 can act as a server, but not as a client.
> 
> Thanks.



See the man pages for mount_smbfs(8)(). You can share files from a Mac with SMB.


----------



## SirDice (Dec 21, 2012)

Simply use scp(1) or sftp(1). Both OS-X and FreeBSD support it by default, no need to install anything. And I'm quite sure you can find a GUI application for it on OS-X.


----------



## pietrasm (Dec 21, 2012)

gkontos said:
			
		

> See the man pages for mount_smbfs(8)(). You can share files from a Mac with SMB.


I will try this, I didn't know that mount_smbfs is a part of base system.


			
				SirDice said:
			
		

> Simply use scp(1) or sftp(1). Both OS-X and FreeBSD support it by default, no need to install anything. And I'm quite sure you can find a GUI application for it on OS-X.


I can use  scp(1) or sftp(1) but I would have to explicitly execute the command after any changes made to the source code. Is there any way to automate it?

I think the net/rsync would be even more suitable but still it requires to be executed after any changes made to the files.

Are there any chances to fix sysutils/fusefs-sshfs? I seems to be the easiest way.

Thanks.


----------



## kpa (Dec 21, 2012)

I use devel/git for syncing my sources across the systems I have. It can be used with an existing ssh(1) connection, preferably with agent forwarding so you don't have to type passwords every time you push or pull the changes.


----------



## pietrasm (Dec 21, 2012)

kpa said:
			
		

> I use devel/git for syncing my sources across the systems I have. It can be used with an existing ssh(1) connection, preferably with agent forwarding so you don't have to type passwords every time you push or pull the changes.


I use devel/git anyway. Unforunteally, it isn't rather a good idea to commit every minor change before even trying to compile the code.

I need to have either some remote file system or some file system mirroring daemon.

Thanks.


----------



## kpa (Dec 21, 2012)

I guess it's a matter of taste but GIT actually encourages a kind of development where commits are very small and numerous as described in gitworkflows(7).


----------



## pietrasm (Dec 21, 2012)

kpa said:
			
		

> I guess it's a matter of taste but GIT actually encourages a kind of development where commits are very small and numerous as described in gitworkflows(7).



That's true but I prefer to at least compile the code anyway. Moreover, it still requires to push and pull by hand.

Are there any chanses to fix sysutils/fusefs-sshfs? Otherwise, I go for SMB sharing.

Thanks.


----------



## gkontos (Dec 21, 2012)

pietrasm said:
			
		

> Are there any chanses to fix sysutils/fusefs-sshfs? Otherwise, I go for SMB sharing.
> Thanks.



I read in the mailing lists that a downgrade to the previous version has solved the _Bad file descriptor_ issue. Apparently you are not the only one who has this problem.


----------



## pietrasm (Dec 22, 2012)

gkontos said:
			
		

> I read in the mailing lists that a downgrade to the previous version has solved the _Bad file descriptor_ issue. Apparently you are not the only one who has this problem.


How can I downgrade a port?

Many thanks.


----------



## pietrasm (Dec 22, 2012)

pietrasm said:
			
		

> How can I downgrade a port?
> 
> Many thanks.



Ok, I have managed to downgrade the sysutils/fusefs-sshfs to version 2.3.

Now I get something like this:

```
%mkdir mnt-point
%sshfs 192.168.0.128:/Users/pietrasm/Dropbox/uni/FinalProject/src/ mnt-point/
^C
%sshfs 192.168.0.128:/Users/pietrasm/Dropbox/uni/FinalProject/src/ mnt-point/
fuse: bad mount point `mnt-point/': Bad file descriptor
%sshfs -V
SSHFS version 2.3
FUSE library version: 2.9.2
mount_fusefs [fuse4bsd] version: 0.3.9-pre1
using FUSE kernel interface version 7.19
%
```
Sshfs doesn't prompts for password, nothing happens for a very long time. When I interrupt it, the mnt-point directory becomes corrupted.

Any other suggestions?

Thanks.


----------



## gkontos (Dec 22, 2012)

Did you also downgrade the sysutils/fusefs-kmod port?


----------



## pietrasm (Dec 22, 2012)

gkontos said:
			
		

> Did you also downgrade the sysutils/fusefs-kmod port?



No, I didn't. sysutils/fusefs-kmod versioning seems strange to me. Which version should I choose? What about sysutils/fusefs-libs version?

Thanks.


----------



## gkontos (Dec 23, 2012)

pietrasm said:
			
		

> No, I didn't. sysutils/fusefs-kmod versioning seems strange to me. Which version should I choose? What about sysutils/fusefs-libs version?
> 
> Thanks.



I am not sure, like I said I have stopped using it. But I read that a downgrade of the kernel module had solved that issue.


----------



## pietrasm (Dec 24, 2012)

I have emailed sysutils/fusefs-sshfs's maintainer and he told me to read pkg-message:

```
Basic Instructions:
There are three ways to do this:

Daemon initiated

1)
% sshfs -o idmap=user username@example.org: /path/to/mount/point

or

2)
% mount_fusefs auto /path/to/mount/point sshfs -o idmap=user \
       username@example.org:

or

3)
% env FUSE_DEV_NAME=/dev/fuse0 sshfs -o idmap=user \
       username@example.org:
% mount_fusefs /dev/fuse0 /path/to/mount/point

For further options see ``sshfs -h''.
```
It works after adding -o idmap=user option. The problem solved.

Thank you all for help.


----------

