Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: How to mount ftp folder to local directory

  1. #1
    Join Date
    Jun 2008
    Beans
    170

    How to mount ftp folder to local directory

    (worked on ubuntu 8.10 but it is very basic and should always work)
    install curlftpfs (type in the terminal)
    Code:
    sudo aptitude install curlftpfs
    edit fstab
    Code:
    sudo gedit /etc/fstab
    add the curlftpfs line with your local directory and ftp user and password
    Code:
    # /etc/fstab: static file system information.
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    defaults        0       0
    # /dev/sda5
    UUID=671919f3-1114-43f1-9fd4-d5b5d4f55969 /               ext3    relatime,errors=remount-ro 0       1
    # /dev/sda6
    UUID=88dd186f-bb66-4b52-834a-f2b8ede16451 none            swap    sw              0       0
    /dev/scd0       /media/cdrom0   udf,iso9660 user,noauto,exec,utf8 0       0
    /dev/disk/by-label/DataDisk   /media/DataDisk  ntfs-3g   rw,user,sgid,suid,exec,auto,utf8  0   1
    /dev/disk/by-label/XP   /media/XP  ntfs-3g   rw,user,suid,sgid,exec,auto,utf8  0   1
    curlftpfs#ftpUsername:ftpPassword@ftp://ftpUrl /localDirectory fuse rw,uid=1000,umask=0777,user,suid,allow_other,exec,auto,utf8  0   1
    this is how my fstab is looks like. please search for fstab for further explanation

    now runing
    Code:
    mount -a
    will mount the ftp
    but !!!
    it will not happen on start up because the default order of boot
    is that first drives are mounted and only then the network is up
    then we will do the following thing

    Code:
    sudo gedit /etc/rc.local
    add this just before the "exit 0" line
    Code:
    mount -a
    I know it will remount drives that are already mounted but it does no harm and it is way simpler then changing order of boot
    have fun

  2. #2
    Join Date
    Jan 2009
    Beans
    15

    Re: How to mount ftp folder to local directory

    Thanks! Worked like a charm.

    One note:

    In /etc/fstab use
    Code:
    curlftpfs#ftpUsername:ftpPassword@ftpUrl /localDirectory fuse rw,uid=1000,umask=0777,user,suid,allow_other,exec,auto,utf8  0   1
    without the "ftp://"


  3. #3
    Join Date
    Oct 2009
    Beans
    1

    Re: How to mount ftp folder to local directory

    Hi,

    You should use the _netdev option instead:

    Code:
    curlftpfs#ftp.server.com /home/jhon/mydir fuse rw,allow_other,auto,user,_netdev 0 0

  4. #4
    Join Date
    Jun 2008
    Beans
    170

    Re: How to mount ftp folder to local directory

    thnx to u2

  5. #5
    Join Date
    Sep 2006
    Location
    Londinium
    Beans
    602

    Re: How to mount ftp folder to local directory

    I am having issues with this setup. Here's my fstab:
    Code:
    # /etc/fstab: static file system information.
    #
    #  -- This file has been automaticly generated by ntfs-config -- 
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    
    proc /proc proc defaults 0 0
    # Entry for /dev/sda6 :
    UUID=087b9e3b-a65c-4890-9b0e-de019b0fff18 / ext4 relatime,errors=remount-ro 0 1,noatime,nodiratime
    #/dev/hda /media/cdrom0 udf,iso9660 user,auto,exec,utf8 0 0
    /dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
    /dev/sda1 /media/c ntfs-3g defaults,locale=pl_PL.utf8 0 0
    UUID=b0d53a94-e988-4860-ab15-95e75be2d71b /media/d ext4 defaults 0 2
    UUID=24e59dc5-cd67-4717-94ed-c3ff28b6ab26 none swap defaults 0 0
    curlftpfs#xxxx:yyyy@zzzz.co.uk /media/d/wwws/zzzz_online fuse rw,allow_other,auto,user,_netdev 0 0
    and here's what's happening when I am trying to mount -a:
    Code:
    ~$ mount -a
    [mntent]: line 9 in /etc/fstab is bad
    fusermount: option allow_other only allowed if 'user_allow_other' is set in /etc/fuse.conf
    EDIT:
    Solved it by uncommenting user_allow_other in /etc/fuse.conf
    Last edited by Lockheed; February 9th, 2010 at 08:31 PM.
    ThinkPad W500: C2D 2,5GHz, 8GB ram, GPU Intel & ATI, Middleton BIOS, SSD + UltraBay HDD, USB 3.0 ExpressCard, BTRFS + full disk encryption.

  6. #6
    Join Date
    Jun 2009
    Beans
    1

    Re: How to mount ftp folder to local directory

    delicious! thank you!

  7. #7
    Join Date
    Jan 2009
    Beans
    7

    Re: How to mount ftp folder to local directory

    At: http://www.compdigitec.com/labs/2008...u-as-a-folder/

    It is suggested to add this line
    Code:
    sudo curlftpfs -o umask=0777,uid=1000,gid=1000,allow_other ftp://username:password@your.ftpserver.here /media/ftpmountedhere
    to rc.local, so that not all drives have to be remounted.

  8. #8
    Join Date
    Jun 2007
    Beans
    17
    Distro
    Kubuntu Development Release

    Re: How to mount ftp folder to local directory

    curlftpfs seems buggy as hell to me. It constantly crashes when trying to delete, and it fails to copy files frequently.

    Are there any alternatives?

  9. #9
    Join Date
    Jun 2007
    Beans
    17
    Distro
    Kubuntu Development Release

    Re: How to mount ftp folder to local directory

    I ended up running curlftpfs in debug mode. What a mess. It constantly spams the server with LOOKUP and getattr requests. I'm surprised I haven't had my account locked.

    The reason that is fails to create new files looks to be that, in the process of spamming the server with pointless requests, it requests the attributes of a file that has only just been touched.
    LOOKUP /New Empty File
    getattr /New Empty File
    unique: 1459, error: -2 (No such file or directory), outsize: 16
    Who wrote this junk software?

  10. #10
    Join Date
    May 2010
    Beans
    23

    Re: How to mount ftp folder to local directory

    curlftpfs is giving me i/o errors too, other clients work fine.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •