Skip to content

Latest commit

 

History

History
74 lines (33 loc) · 1.73 KB

File metadata and controls

74 lines (33 loc) · 1.73 KB

Basic

Example invocation using sshfs:

`afuse -o mount_template="sshfs %r:/ %m" \
        -o unmount_template="fusermount -u -z %m" \
           mountpoint/`

Now try ls mountpoint/user@host/.

afuse examples

        afuse -o mount_template="sshfs -o allow_other -o idmap=user %r:/ %m" -o unmount_template="fusermount -u -z %m" ~/sshfs/
        afuse -o mount_template="curlftpfs -o allow_other ftp://%r %m" -o unmount_template="fusermount -u -z %m" /ftpfs/
        afuse -o mount_template="wdfs http://%r %m -o allow_other -o username=user -o password=password" -o unmount_template="fusermount -u -z %m" /davfs/

Auto-Mount (dr)FTP/HTTP/DAV/Whatever Server with LFTPFs

Bsp: Automount drFTPd Site & prepopulate dir's

Example: ls /mnt/iNCOMiNG

Preq: Write your "mount script"

  • ~/lftp/site-incomming

          set ftp:fxp-force no
          set ftp:fxp-passive-source true
          set ftp:use-fxp false
          set ssl:check-hostname no
          set ssl:verify-certificate no
          
          open ftp://USERNAME:[email protected]:10900/
    
  • Get your preprolutatet dir list like

            echo | lftp -e 'cd iNCOMiNG/;nlist' site-yours > ~/lftp/cat-incoming
    
  • Create cache dir's

          mkdir /mnt/cache && cd !$
          cat ~/lftp/cat-incoming | xargs  mkdir
    
  • Now the afuse magic:

          afuse -o populate_root_command="echo | cat ~/lftp/cat-incoming" \
            -o mount_template="lftpfs --options=allow_other --no-cache=true %m /mnt/cache/%r \
             ~/lftp/site-incomming /iNCOMiNG/%r" -o unmount_template="fusermount -u -z %m" /mnt/iNCOMiNG/%r