• The forum software that supports hummy.tv will be upgraded to XenForo 2.3 on Wednesday the 20th of November 2024 starting at 7pm

    There will be some periods where the forum is unavailable, please bear with us. More details can be found in the upgrade thread.

FTP client

prpr

Well-Known Member
How easy would it be to compile a bog-standard FTP client for the T2?
I looked at importing the Debian pre-compiled one, but it ends up needing 10 million dependent packages to make it work.
I looked at the source for it as well, but it ends up apparently needing 10 million dependent packages to make it work (although most of them seem similar to what I already have installed).
Arrgghhh...... Linux drives you insane.

What would be the best way to go about it?
 
I'll see if I can compile and package one.

The curl command supports FTP (upload and download) if that's of use.
 
I'll see if I can compile and package one.
Thanks. I'd be quite interested in knowing how you go about it, if you have time to write some words of guidance.

The curl command supports FTP (upload and download) if that's of use.
I knew wget and curl did download, but never investigated either for upload.
Sometimes it's just easier to drive things manually using basic standard familiar tools.
 
Makem is the member who first made me aware of it - see HERE (click). File Exchange Protocol uses FTP to pass data between two other machines, so you would only need a FXP client on the command machine and FTP servers on the data machines.

I'll post other references when I find them.
Most FTP servers disable this though. It's a security risk for many reasons.
 
Makem had success with it.
Maybe it pulls the data down to the client machine from one server, then uploads it to the other. The original FTP protocol also supported direct server-to-server transfers controlled by a standard FTP client on a third system. No longer widely used.
 
Thanks. I'd be quite interested in knowing how you go about it, if you have time to write some words of guidance.

I just compiled tnftp in my cross-compilation environment.

Code:
CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" \
./configure \
    --prefix=/mod \
    --host=mipsel-linux \
    --target=mipsel-linux \
    --disable-nls \
    --disable-editcomplete

Tried a couple of other small clients too but they had too many dependencies or required GNU libc.
 
Makem is the member who first made me aware of it - see HERE (click). File Exchange Protocol uses FTP to pass data between two other machines, so you would only need a FXP client on the command machine and FTP servers on the data machines.
Oh right, I'll have a read of that thread.

FXP seems hideously insecure and is usually disabled as far as I can tell - don't know how this applies to BetaFTPD for example.
I don't have a client and anyway it's not really what I want to do.
 
In case you missed it in the fast moving thread, tnftp now in the repository:

Code:
humax# opkg update && opkg install tnftp
Downloading http://hummypkg.org.uk/hdrfoxt2/base/Packages.gz.
Inflating http://hummypkg.org.uk/hdrfoxt2/base/Packages.gz.
Updated list of available packages in /mod/var/opkg/base.
Installing tnftp (20091122) to root...
Downloading http://hummypkg.org.uk/hdrfoxt2/base/tnftp_20091122_mipsel.opk.
Configuring tnftp.
humax#  
humax# ftp hummypkg.org.uk
Trying 2a00:5600:1600::1:1:21 ...
ftp: Can't create socket for connection to `2a00:5600:1600::1:1:21': Address family not supported by protocol
Trying 89.248.55.76:21 ...
Connected to 2a00:5600:1600::1:1.
220 Citrus IT FTP Server ready.
Name (hummypkg.org.uk:root): ftp
331 Anonymous login ok, send your complete email address as your password
Password: 
230 Access permitted.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.
 
Absolutely brilliant af123. You're a legend. Less than an hour. What more could anybody ask?
Thankyou.
 
I've been trying to use the ftp client on a diskless HD box (downloaded onto the machine from another using wget).
It crashes with a Segfault error on attempting to open a connection to anywhere.
I downloaded strace the same way and ran it under that to see if I could work out the cause.
The last thing it does is try to read /etc/hosts so I took a look at that and found it symlinked to /tmp/hosts, which doesn't exist. Ah!
A quick "touch /tmp/hosts" sorted it out, but it would be better if this sort of stuff didn't happen, although not sure exactly where/how to apply any sort of fix.
 
Last edited:
/tmp/hosts is created during boot by the /sbin/modinit script. Any ideas why it may have failed in your setup?
 
Isn't modinit run by run-and-gun which is run by mdev which is run by the kernel when it detects a disk being connected?
I did say it was diskless, so none of this will happen and therefore the file doesn't get created?
Or does/should "modinit -minimal" get run some other way?
There is no /tmp/modinit.log file either.
 
Yes, sorry missed the diskless bit.
modinit -minimal is still triggered by disk detection; it runs when the disk being connected is not EXT2/3.

Something to consider fixing in the next firmware. I could update the FTP client package so that it doesn't crash but not sure if it's worth it.
 
Back
Top