20080509

automounting ftpfs using curlftpfs and autofs

Software requirements:
  1. working autofs instalation
  2. fuse
  3. curlftpfs
Procedure:
  1. create /sbin/mount.curl containing:
    #!/bin/bash
    curlftpfs $1 $2 -o allow_other,disable_eprt


  2. create /sbin/umount.curl containing:
    #!/bin/bash
    fusermount -u $1


  3. make both created *.curl files executable


  4. add /mnt/ftp /etc/autofs/auto.ftp --ghost
    to /etc/autofs/auto.master

  5. create /etc/autofs/auto.ftp file containing:

    myFTP -fstype=curl,allow_other :ftp\://USER\:PASSWORD\@MACHINE/




Et voila!
cd /mnt/ftp/myFTP; ls