Page 1 of 3 123 LastLast
Results 1 to 10 of 22

Thread: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

  1. #1
    Join Date
    Jul 2006
    Beans
    107

    Arrow [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    This how-to is intended to help those who want to mount an FTP site as a filesystem using CurlFtpFS.

    Yesterday I was told I could mount an FTP site as a filesystem using CurlFtpFS, but I found that on ubuntuforums it isn't well explained. So I searched around the web and the forum posts and finally I have been able to mount properly my FTP site. I decided to make this post to summarize all the information I found to help ubuntu users who want to install CurlFtpFS.

    First of all, I'm using Ubuntu 6.10 Edgy Eft, but I think you can use this post also whit other Ubuntu versions. If it's the case, don't hesitate to post your problems, suggestions, etcetera.

    cURLftps package isn't available in Ubuntu, so I downloaded it from Debian. Anyway you must satisfy some dependencies and so you must upgrade some other packages.

    EDIT: A curlftpfs backport to Edgy is available thanks to mlind here: curlftpfs-0.9.1-1_edgy.tar.bz2 so now you have two ways for installing it.

    EDIT: curlftpfs is available for Feisty and Gutsy

    Installing Feisty or Gutsy packages

    use aptitude or apt-get (I prefer the first one)
    Code:
    sudo aptitude install curlftpfs
    then proceed to the configuration as explained in the Edgy part and in the common part of this how-to

    Installing DEBIAN packages

    mlind's advice is no to use too many packages from other distribution, so if you want, you can skip this part and try to install the Edgy backport. Anyway, also the second way is a little bit tricky.

    Download the following packages from http://packages.debian.org (testing) for your processor architecture:

    libgpg-error0: http://packages.debian.org/testing/libs/libgpg-error0

    libgpg-error-dev: http://packages.debian.org/testing/l...bgpg-error-dev

    libcurl3-gnutls: http://packages.debian.org/testing/libs/libcurl3-gnutls

    fuse-utils: http://packages.debian.org/testing/utils/fuse-utils

    curlftpfs: http://packages.debian.org/testing/utils/curlftpfs

    Install them; supposing you have put them in the folder curlftpfs do:
    Code:
    cd curlftpfs
    sudo dpkg -i *.deb
    If it is all ok you can proceed to edit your /etc/fstab file.
    Use the following command to append the curlftpsfs option to /etc/fstab
    Code:
    sudo echo "curlftpfs#ftpusername:ftppassword@ftp.site.address /path/to/mountpoint fuse allow_other,uid=userid,gid=groupid 0 0" >> /etc/fstab
    Where
    ftpusername is the username to log in the FTP site
    ftppassword is the password to log in the FTP site
    userid and groupid are respectively the uid and the gid of your current user of your computer;
    you can discover them typing
    Code:
    id
    in a shell (this will print your user and groups IDs).

    Installing EDGY packages
    download the Edgy backport: curlftpfs-0.9.1-1_edgy.tar.bz2

    be sure to meet the following dependencies: libc6 (2 2.4-1) libcomerr2 (2 1.33-3) libcurl3 (2 7.15.4-1) libfuse2 (0 (null)) libglib2.0-0 (2 2.12.0) libidn11 (2 0.5.18) libkrb53 (2 1.4.2) libssl0.9.8 (2 0.9.8b-1) zlib1g (2 1:1.2.1) fuse-utils (0 (null))

    decompress the archive in an empty directory (or create a new one)
    Code:
    mkdir curlftps-edgy
    tar xvjf curlftpfs-0.9.1-1_edgy.tar.bz2 -C curlftps-edgy
    install the edgy backport
    Code:
    sudo dpkg -i curlftpfs_0.9.1-1_i386.deb
    If it is all ok you can proceed to edit your /etc/fstab file.

    Use the following command to append the curlftpsfs option to /etc/fstab
    note that this is different from debian packages procedure due to the different curlftpfs version
    Code:
    sudo echo "ftpusername:ftppassword@ftp.site.address /path/to/mountpoint curlftpfs rw,allow_other,uid=userid,gid=groupid 0 0" >> /etc/fstab
    last step is to let mount recognize the filesystem type:
    Code:
    sudo ln -s /usr/bin/curlftpfs /sbin/mount.curlftpfs

    common part

    Now you need your non-root user to be able to mount the FTP site without sudo.

    Change the group owner of your ftp mountpoint:
    Code:
    chgrp fuse /path/to/mountpoint
    be sure that fuse group has write permission on the directory
    Code:
    sudo chmod g+w /path/to/mountpoint
    Add your current user to fuse group:
    Code:
    addgroup username fuse
    Maybe you should logout and then login again to apply this change.

    That's all, now you should be able to mount your preferred FTP site as it were an hard disk.

    Thaks to:
    Shinda http://ubuntuforums.org/showthread.php?t=318824
    Koybe http://ubuntuforums.org/showthread.php?t=369895
    Mlind http://ubuntuforums.org/showthread.php?t=441141
    Last edited by geco; May 25th, 2007 at 11:33 PM. Reason: updating the how-to
    Debian testing user.
    Don't underestimate the power of *nix manual!!!
    Code:
     geco@biohazard:~$ man man

  2. #2
    Join Date
    Jul 2006
    Beans
    107

    UPDATE: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    waiting for this post to be approved I asked for Ubuntu packges here:

    http://ubuntuforums.org/showthread.p...33#post2664733

    as curlftpfs is available for Feisty and Gutsy you can skip the Debian Packages download part.

    anyway, maybe curlftpfs will be available for Dapper and Edgy too.
    Debian testing user.
    Don't underestimate the power of *nix manual!!!
    Code:
     geco@biohazard:~$ man man

  3. #3
    Join Date
    Mar 2007
    Location
    Dallas, TX
    Beans
    55
    Distro
    Ubuntu Studio 10.10 Maverick Meerkat

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    I had to add a

    Code:
    curlftpfs ftp://my.ftpsite.com /mount/point/
    to my startup. I found it on the curlftpfs web site. It wasn't exactly easy, but it works wonderfully. Thanks for the howto!
    Last edited by goodtimetribe; May 19th, 2007 at 06:32 AM. Reason: gave it more thought

  4. #4
    Join Date
    Aug 2006
    Beans
    7

    Exclamation Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    For AMD64-users (like me *g*) the edgy-package won't work since it links to some 32bit-Version of libcurl.so.2. I installed it with --force-architecture, but it always brought up an error like "missing library libcurl.so.2 - No such file or directory". Trying to link to the library in /usr/lib(64) gave me an "wrong ELF" error - of course.

    Anyway, it works beautifully when installed from source. Download the latest source package (in my case 0.9.1) from Sourceforge (http://sourceforge.net/projects/curlftpfs/). Untar it somewhere and do the obligatory

    # ./configure
    # make
    # make install

    I did a fresh apt-get upgrade beforehand and had to install libcurl3-dev and libfuse2-dev (iirc), so if configure complains, just try to install any missing fuse or curl packages for Edgy, having an special eye on the -dev ones which are needed.

    The make procedure dropped the binary in /usr/local/bin which gave me an error when trying to invoke it directly

    # curlftpfs -V
    bash: curlftpfs: command not found

    Maybe it was because I dpkg-installed and removed the abovementioned Edgy-Packet before. So I did a quick

    # ln -s /usr/local/bin/curlftpfs /usr/bin/curlftpfs

    And now curlftpfs -V gave me some nice version information, telling me thereby that all seemed to work fine. And indeed it did, at least mounting an FTP-Host directly. Didn't try the fstab-version yet.

    Hope this is of Help to anyone and thanks for the good Information on the topic so far, guys. Hope this has been a one-time-hassle for me until I upgrade to feisty.

    PS: The manpage was not installed correctly here, either. But you can bring it up with

    $ man /usr/local/share/man/man1/curlftpfs.1
    Last edited by floyd24; May 23rd, 2007 at 06:00 PM. Reason: Fixed some typos and added Manpage info

  5. #5
    Join Date
    Oct 2005
    Location
    Belgium
    Beans
    249
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    I'm trying this in Feisty (by adding it to fstab), but when I have to do 'chgrp fuse /media/nas' (either as root or as me) it says: 'Operation not permitted'.

    Anyone know why?

    i bought a nas, and i initially planned to mount it as a smb share, but smb is way too slow for this (and it hangs nautilus on folders with many files for some reason). Ftp works better (i get double the speed when i transfer files with Filezilla, so i want to be able to do this).

    Are there any drawbacks to using ftp to share a folder like this, btw?

    edit: i fixed the first issue, and it mounts fine, but now i get this:
    Code:
    jonne@fry:~$ cd /media/nas
    jonne@fry:/media/nas$ ls
    media
    jonne@fry:/media/nas$ cd media/
    jonne@fry:/media/nas/media$ ls
    ls: reading directory .: Input/output error
    jonne@fry:/media/nas/media$
    media is a folder on the share, and contains 2 folders: music and video.
    Last edited by Jonne; May 25th, 2007 at 08:52 PM.

  6. #6
    Join Date
    Jun 2007
    Location
    Arezzo, ITALY
    Beans
    51
    Distro
    Ubuntu Studio 9.10 Karmic Koala

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    Hi, i've got a rouble mounting FTPFT with fuse (or any other commandline sw...) because my ISP (aruba.it) send me these detais:

    Host : ftp://ftp.MySite.com
    Login : 123456@aruba.it
    Pass: 123456

    When i try to connect with
    PHP Code:
     curlftpfs ftp://123456@aruba.it:123456@ftp.MySite.com /mnt/tda/ 
    i've got this error:
    PHP Code:
    Error connecting to ftpCouldn't resolve host aruba.it:123456@ftp.terredegliangeli.com' 
    Too Many "@", ithink.

    If someone has a solution... let me know....
    Sine requiem bellum in aeternitate con fatum aut contra fatum superbibendus!

  7. #7
    Join Date
    Nov 2007
    Beans
    1

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    Host : ftp://ftp.MySite.com
    Login : 123456@aruba.it
    Pass: 123456

    curlftpfs ftp://123456%40aruba.it:123456@ftp.MySite.com /mnt/tda/

  8. #8
    Join Date
    Jan 2007
    Location
    Florida, USA
    Beans
    13
    Distro
    Xubuntu 7.10 Gutsy Gibbon

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    This works fine for me until I try to delete a file. I get an error about a transport endpoint. Then when I try to remount I get this:
    Code:
    michael@michael-desktop:~$ sudo mount -a
    fuse: bad mount point `/media/xbox': Transport endpoint is not connected

  9. #9
    Join Date
    Aug 2006
    Beans
    9
    Distro
    Ubuntu 6.06

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    Quote Originally Posted by hencethus View Post
    This works fine for me until I try to delete a file. I get an error about a transport endpoint. Then when I try to remount I get this:
    Code:
    michael@michael-desktop:~$ sudo mount -a
    fuse: bad mount point `/media/xbox': Transport endpoint is not connected
    I get the same error. Libcurl in the 7.10 repository doesn't seem to be the latest version 7.16.4 vs. 7.17.1 from source, so it's difficult to know if it has been fixed.

    I've installed libcurl from source, and curl reports it's using libcurl 7.17.1. However, curlftpfs still reports

    curlftpfs 0.9.1 libcurl/7.16.4 fuse/2.5

    I'm not sure how to make curlftpfs use the latest library I've installed to see if this resolves the problem.

    (I've seen many mentions of this across the Internet so it does seem to be a general problem for Ubuntu users who have upgraded to v7.10).

    Best wishes,
    David.

  10. #10
    Join Date
    Aug 2006
    Beans
    9
    Distro
    Ubuntu 6.06

    Re: [HOWTO] mount an FTP host as a filesystem using CurlFtpFS

    Quote Originally Posted by simd View Post
    I'm not sure how to make curlftpfs use the latest library I've installed to see if this resolves the problem.

    (I've seen many mentions of this across the Internet so it does seem to be a general problem for Ubuntu users who have upgraded to v7.10).
    OK, fixed my own problem and curlftfs is now working (or seems to be from the limited testing I've carried out).

    In short the solution seems to be:

    1. Download the latest curl source (7.17.1 at the time of writing) from http://curl.haxx.se/download.html

    2. Compile and install the downloaded version of curl.

    3. Copy the new version of curl from /usr/local/lib to /usr/lib. You may need to amend the symbolic link for libcurl.so.3 and libcurl.so.4 in that folder to point at the new libcurl.so.4.0.1.

    curlftpfs should now see the new version and everything should be well.

    This is a workaround until Ubuntu's curl version has been updated to the latest by the maintainer, which would avoid these steps and automatically install the new version via an update.

    Best wishes,
    David.

Page 1 of 3 123 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
  •