Results 1 to 10 of 10

Thread: curlftpfs

  1. #1
    Join Date
    Aug 2021
    Location
    Italy
    Beans
    96
    Distro
    Kubuntu 22.04 Jammy Jellyfish

    curlftpfs

    Hi there
    I set up a ftp server, I can access it without problems using dolphin, all I need to do is specify protocol, ip address and port (ftp://192.168.178.37:4663)
    I try to mount with curlftpfs with this command:
    Code:
    curlftpfs 192.168.178.37 /home/user/test/ -o ftp_port=4663
    and I get
    Code:
    Error connecting to ftp: Failed to connect to 192.168.178.37 port 21 after 5 ms: Connection refused
    Obviously my syntax is wrong since it tries to use the standard port 21 instead of 4663, I tried to put "-o ftp_port=4663" before my ip address and got the same error message
    any suggestions?
    thanks a lot in advance

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: curlftpfs

    Nobody should be using plain FTP since 2002. Use a better protocol.

    Heck, use sshfs instead. Combined with ssh-keys, it is seamless, assuming you won't use NFS.

    Code:
    mkdir ~/mount-point
    sshfs     username@192.168.178.37:~username/      ~/mount-point
    Now you can use any file manager to access ~/mount-point/ and use it like it is local storage. This is secure enough to use over the internet, if you must, though network performance and latency will be felt.

    Of course, there is a dependency on ssh-server, but that would be installed on any Linux/Unix system anyway.

    Stop using plain FTP. https://www.howtogeek.com/886945/ftp...-sftp-instead/ There are many, many, more articles which explain why plain FTP should be killed everywhere.

  3. #3
    Join Date
    Aug 2021
    Location
    Italy
    Beans
    96
    Distro
    Kubuntu 22.04 Jammy Jellyfish

    Re: curlftpfs

    Quote Originally Posted by TheFu View Post
    Nobody should be using plain FTP since 2002. Use a better protocol.

    Heck, use sshfs instead. Combined with ssh-keys, it is seamless, assuming you won't use NFS.
    You are absolutely right, setting up an ssh server is easy, fast and secure (I copy my keys and then disable password access), after that all you have to do is mount the remote file system with sshfs. Samba share is also quite easy to set up and very useful for android devices or VMs with old operating systems (like windows xp)
    My question was a personal curiosity, I am running a few tests on my lan so it is not really a problem.

    Just an off topic question. Is it safe to access my ftp server outside my lan if I use a vpn installed on my modem/router (wireguard) ?
    thanks a lot for the reply

  4. #4
    Join Date
    May 2024
    Beans
    Hidden!

    Re: curlftpfs

    It is not really possible for someone other than yourself to answer how safe something is. Generally speaking, wireguard is a secure way to remotely access hosts, and your local network does not really need encryption if all hosts on it are controlled. That being said, what are you trying to do? Just access your files from other hosts? There are much simpler, more elegant solutions than FTP.

  5. #5
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: curlftpfs

    Quote Originally Posted by demonenero84 View Post
    You are absolutely right, setting up an ssh server is easy, fast and secure (I copy my keys and then disable password access), after that all you have to do is mount the remote file system with sshfs. Samba share is also quite easy to set up and very useful for android devices or VMs with old operating systems (like windows xp)
    My question was a personal curiosity, I am running a few tests on my lan so it is not really a problem.
    Plain FTP can be fast, but with any CPU made the last 15 yrs, sftp, sshfs, NFS, are very fast. The only time I use Samba is for MS-Windows. Ghost Commander on Android supports sftp or there are tools like nextcloud, wormhole, rsync to move files to-from android.
    For testing network performance, I start with iperf3, then move to scp, NFS, sshfs, and if I really want the fastest, then I'll use netcat. It is also possible to run a 1-line web server using almost any scripting language if you want to provide short-term access to all the files below a directory level. Some examples.

    Code:
    Python 3.x
      $ python3 -m http.server 8000 
    
    Ruby 1.9.2+
       $ ruby -run -ehttpd . -p8000
    
    PHP (>= 5.4)
       $ php -S 127.0.0.1:8000
    
    busybox httpd
       $ busybox httpd -f -p 8000
    I tend to use the python one, even though I'm a perl guy. But
    Code:
       $ plackup -MPlack::App::Directory -e
                   'Plack::App::Directory->new(root=>".");' -p 8000
    just doesn't feel as easy. I already use plack for those stuff, so it is already installed on my perl dev systems.

    Quote Originally Posted by demonenero84 View Post
    Just an off topic question. Is it safe to access my ftp server outside my lan if I use a vpn installed on my modem/router (wireguard) ?
    thanks a lot for the reply
    If you are using wireguard, then almost any protocol is fine, thought plain FTP wouldn't be the way I did it. I'd just use sftp:// URLs and come in over ssh outside the wireguard tunnel, if I were on a Linux laptop. Pretty much all Linux file managers support sftp:// URLs (or some weird replacement that does the same thing using sftp).

    In short, getting out of the plain FTP mindset will simplify your life and keep you from accidentally doing something with poor security.

  6. #6
    Join Date
    Aug 2021
    Location
    Italy
    Beans
    96
    Distro
    Kubuntu 22.04 Jammy Jellyfish

    Re: curlftpfs

    Quote Originally Posted by currentshaft View Post
    That being said, what are you trying to do? Just access your files from other hosts? There are much simpler, more elegant solutions than FTP.
    I was looking for a practical way to share files between my linux desktop and android devices. Right now I installed a samba server on my pc and I use an app on my phone that acts as a samba client, it works quite well, I am able to upload files from android to linux and access files shared folders from android. Since the android app that I use (File manager plus) can act as an FTP server I was curious to learn a bit about FTP and curlftpfs. It would be nice to have a quick and easy way to mount my android filesystem on my desktop, KDE connect can do that but it seams to slow down transfer speed.

    thanks for the reply

    Quote Originally Posted by TheFu View Post
    Code:
    Python 3.x
      $ python3 -m http.server 8000 
    
    Ruby 1.9.2+
       $ ruby -run -ehttpd . -p8000
    
    PHP (>= 5.4)
       $ php -S 127.0.0.1:8000
    
    busybox httpd
       $ busybox httpd -f -p 8000
    I tend to use the python one, even though I'm a perl guy. But
    Thanks I am a python guy myself
    Quote Originally Posted by TheFu View Post
    In short, getting out of the plain FTP mindset will simplify your life and keep you from accidentally doing something with poor security.
    I see, I like to play with old windows VMs, FTP works fine with Windows 98, qemu-nbd is a rather cumbersome way to move files around, any suggestions for VMs with old operating systems?
    thanks a lot for the reply
    Last edited by demonenero84; 1 Week Ago at 09:41 PM.

  7. #7
    Join Date
    Dec 2009
    Beans
    6,780

    Re: curlftpfs

    I don't want to get in the middle of a religious debate about ftp but just so you know there is no curlftpfs in Ubuntu 24.04 or any other disto derived from Debian 12. Too buggy apparently.

  8. #8
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: curlftpfs

    Quote Originally Posted by demonenero84 View Post
    I see, I like to play with old windows VMs, FTP works fine with Windows 98, qemu-nbd is a rather cumbersome way to move files around, any suggestions for VMs with old operating systems?
    thanks a lot for the reply
    Any standard network protocol works inside VMs, assuming you choose normal, bridged, networking. If you choose host-only or NAT, then the guest can access outbound, but not the opposite. That's a "feature" in those other choices, right?

    If you want bi-directional connections, then you'll need to run a server of some sort on both sides and use bridged networking. Probably want to use a firewall to limit access to unsupported OSes. They really shouldn't be setup to allow inbound connections of any type.

    Win98 was a the worst OS I've ever had. MS-DOS v5 was better, even with the limitations. I had a Win98 system that would boot and even if I didn't touch it, within 2 hrs it would BSOD on it's own. Win95 was stable (not really), in comparison. Win95 was stable when compared to Win3.11. Win98 was a huge step backwards. Of course, during those years, I was an OS/2 Warp user on my desktop and ran Linux on my home server. OS/2 never crashed. Uptime was measured in months, not hours.

    NT4 was almost as stable. It did some funky things to my NT4 workstation and it would stay up for 3+ weeks, which was about the time I needed to reboot for some new library. I was doing C/C++ cross-platform development in that decade, so we had 1 of every OS in our lab for porting software.

    Sometimes I do get religious about plain FTP. There are just so many better protocols to be used that are much more firewall friendly and don't put credentials in the open.
    Last edited by TheFu; 1 Week Ago at 12:50 PM.

  9. #9
    Join Date
    Aug 2021
    Location
    Italy
    Beans
    96
    Distro
    Kubuntu 22.04 Jammy Jellyfish

    Re: curlftpfs

    Quote Originally Posted by Morbius1 View Post
    I don't want to get in the middle of a religious debate about ftp but just so you know there is no curlftpfs in Ubuntu 24.04 or any other disto derived from Debian 12. Too buggy apparently.
    Ok thanks, I am still on 22.04, I will update soon

    Quote Originally Posted by TheFu View Post
    Any standard network protocol works inside VMs, assuming you choose normal, bridged, networking. If you choose host-only or NAT, then the guest can access outbound, but not the opposite. That's a "feature" in those other choices, right?

    If you want bi-directional connections, then you'll need to run a server of some sort on both sides and use bridged networking. Probably want to use a firewall to limit access to unsupported OSes. They really shouldn't be setup to allow inbound connections of any type.
    Thanks a lot

  10. #10
    Join Date
    Dec 2009
    Beans
    6,780

    Re: curlftpfs

    Quote Originally Posted by demonenero84 View Post
    Ok thanks, I am still on 22.04, I will update soon
    When you do move to 24.04 and Dolphin still posses an issue you will be forced to use something else ... like filezilla for example.

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
  •