You are not logged in.

#1 2008-09-30 14:47:36

pjjanak
Member
Registered: 2008-08-17
Posts: 128

Autofs and SSHFS Woes

So, sshfs seems to be set up fine, but autofs refuses to start. Well, it claims to start but automatically tanks out. Also, it doesn't seem to log anything in /var/log/daemon.log so I can't check there to see what the problem is. Basically, I'm at a loss.

Here is my auto.master:

File Edit Options Buffers Tools Help                                            
# Sample auto.master file                                                       
# Format of this file:                                                          
# mountpoint map options                                                        
# For details of the format look at autofs(5).                                  
                                                                                
/home/peter /etc/auto.sshfs        uid=1000,gid=100,--timeout=300

And here is my auto.sshfs:

ginger -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#peter@flopsy1.rh.rit.edu\:/home/peter/ginger

The directory "ginger" doesn't even get created. Help!

Edit: Okay, so I fixed one problem. I was pointing to the wrong file in auto.master (/etc/auto.sshfs instead of /etc/autofs/auto.sshfs). But, now when I try to access the folder, it says that it can't mount and asks if the folder has been removed...I know the folder exists on the other end, so why won't it mount here?

Last edited by pjjanak (2008-09-30 16:45:53)

Offline

#2 2008-10-01 01:07:05

Pudge
Arch Linux f@h Team Member
Registered: 2006-01-23
Posts: 300

Re: Autofs and SSHFS Woes

I tried to do this once in this thread but never got it working.  I never did try perost's suggestion, I had given up by that point.  Let me know if you get this going. 

Pudge

Offline

#3 2008-10-01 02:15:55

pjjanak
Member
Registered: 2008-08-17
Posts: 128

Re: Autofs and SSHFS Woes

I had tried that first, actually, and nothing came of it.

Peter

Edit: Actually, looking at it again, I seem to be getting "connection reset by peer" errors in the logs. I know I can do a normal sshfs mount of the folder it just doesn't seem to work using autofs...*grumble grumble*...

Last edited by pjjanak (2008-10-01 02:21:52)

Offline

#4 2009-04-20 20:04:18

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Autofs and SSHFS Woes

sorry to dig up an old thread, but i found a workaround for the above by copying the private ssh key to root. in my case:

sudo cp ~/.ssh/id_dsa /root/.ssh

since autofs runs as root it can't find the regular keyfile, as it looks for it in it's own .ssh directory. the above is a bit of a hacky workaround and there surely must be a better way (if someone knows one, let me know!), but at least it works...

i had hoped to fix it somehow with proper uid/gid settings but those seem to get ignored by autofs, it always mounts fuse with nosuid. i'm not entirely positive that is the exact reason why it fails (would it find the normal keyfile if it did run with gid=$USER ?), but it seems to be something in that direction.


ᶘ ᵒᴥᵒᶅ

Offline

Board footer

Powered by FluxBB