- working autofs instalation
- fuse
- curlftpfs
- create
/sbin/mount.curl
containing:
#!/bin/bash
curlftpfs $1 $2 -o allow_other,disable_eprt - create
/sbin/umount.curl
containing:
#!/bin/bash
fusermount -u $1 - make both created *.curl files executable
add/mnt/ftp /etc/autofs/auto.ftp --ghost
to/etc/autofs/auto.master
- create
/etc/autofs/auto.ftp
file containing:
myFTP -fstype=curl,allow_other :ftp\://USER\:PASSWORD\@MACHINE/
Et voila!
cd /mnt/ftp/myFTP; ls
4 comments:
Before I get to the automounting part I thought I would get manual mounting working. mount works successfully as does fusermount -u /mnt/usb, but umount:
$ umount /mnt/usb
umount: /mnt/usb mount disagrees with the fstab
This is mentioned a few places around the traps, but I haven't seen a solution.
Thoughts?
Regards
Fog_Watch.
Kernel: 2.6.26-gentoo-r3
curlftpfs-0.9.1
Too much a work, you can do the same thing easier.
I've got following /etc/auto.ftp:
#!/bin/sh
key="$1"
opts="-fstype=fuse,rw,nodev,nosuid,nonempty,noatime,allow_other"
proto="curlftpfs"
echo "$opts" ":$proto\\#$key"
Don't forget to chmod a+x /etc/auto.ftp.
Now I have line in my /etc/auto.master:
/remote/ftp /etc/auto.ftp uid=1001,gid=1001,--timeout=30,--ghost
And at least I put .netrc with hosts/usernames/passwords into ~root.
So I can cd into /remote/ftp/some.host.name and this host is automagically mounted via curlftpfs. No need for wrapper scripts around curlftpfs!
I tried with both methods but no luck. Can you tell me how should I debug this.
Can do even better (without script)
In /etc/auto.ftp (or /etc/autofs/auto.ftp):
myFTP -fstype=fuse curlftpfs#USER\:PASSWORD\@MACHINE
Post a Comment