Have to access sshfs automount folder as sudo...

196 views
Skip to first unread message

martin

unread,
Sep 24, 2012, 5:18:48 AM9/24/12
to fus...@googlegroups.com
Hi,

I have installed fuse4x 0.9.1 and sshfs on OS X Mountain Lion and set up an automount using /etc/fstab. It's working fine except that I have to access the folder with sudo for it to mount and after that it works correctly even without sudo until the mount times out then I have to access the folder with sudo again.
Here is an example:
ls -la ~/Documents/folder
ls: : Operation not permitted

it generates these errors in the systemlog:
kernel[0]: fuse4x: filehandle_get: failed for ? (type=0, err=57, caller=0xffffff7f8d73d4ce)
kernel[0]: fuse4x: filehandle_get failed in open (type=0, err=57)
kernel[0]: fuse4x: filehandle_get: failed for ? (type=0, err=57, caller=0xffffff7f8d73d4ce)
kernel[0]: fuse4x: filehandle_get failed in open (type=0, err=57)

but running it with sudo works correct
sudo ls -la ~/<folder>
and it returns the content. I can then list the content and use the folder without sudo without any problem.

My fstab looks like this:
dummy:<user>@sshserver:/path/ /Users/martin/Documents/folder sshfs volname=<volname>,allow_other,uid=1030 0 0

It seems to me that the problem is that the folder owner changes to root when it unmounts the filesystem:
dr-xr-xr-x   2 root    wheel      1 24 Sep 10:46 folder

When accessing the folder with sudo I get the right permissions:
drwxr-xr-x   1 martin  wheel   4096 24 Sep 07:40 folder

but after the mount times out it reverts back to root as owner.

Any suggestions for fixing this is much welcome.

Regards
Martin
Reply all
Reply to author
Forward
0 new messages