7

I have an embedded system which has busybox support. I am trying to run an FTP server so I can edit the files and upload data to my embedded system. However when I run

busybox ftpd -w / 

It tells me I need to use the inetd and put it in the conf. But I dont want to do this for a number of reasons. When I try tcpvd as given in the busybox link page I get command not defined. Any suggestions?

Ron SV
  • 79
  • 1
  • 1
  • 2

2 Answers2

2

Did you try this command:

tcpsvd -vE 0.0.0.0 21 ftpd /

/ # busybox ftpd -w /                                                           
BusyBox v1.20.0 (2012-04-22 12:29:58 CEST) multi-call binary.                   

Usage: ftpd [-wvS] [-t N] [-T N] [DIR]                                          

Anonymous FTP server                                                            

ftpd should be used as an inetd service. ftpd's line for inetd.conf:

    21 stream tcp nowait root ftpd ftpd /files/to/serve                     

It also can be ran from tcpsvd:

    tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve                              

    -w      Allow upload                                                    
    -v      Log errors to stderr. -vv: verbose log                          
    -S      Log errors to syslog. -SS: verbose log                          
    -t,-T   Idle and absolute timeouts                                      
    DIR     Change root to this directory                                   

/ # tcpsvd -vE 0.0.0.0 21 ftpd /                                                
tcpsvd: listening on 0.0.0.0:21, starting                                       

Tested at https://www.busybox.net/live_bbox/live_bbox.html

chicks
  • 3,639
  • 10
  • 26
  • 36
  • tcpsvd is not recognized. I dont have that program – Ron SV Apr 17 '16 at 13:41
  • Do you have command wget ? / # busybox --list | grep wget – stambata Apr 18 '16 at 12:09
  • Hmm.. seems slim on the applets. Could recompile busybox to have more applets: https://busybox.net/FAQ.html#adding Or perhaps netcat can be used if available: from busybox: nc -l 7777 > filetoserv , client gets file with: nc servername.come 7777 < filetosave . credit: various web suggestions – Shannon VanWagner Apr 19 '16 at 14:00
  • I'm running into the same problem. The BusyBox I have compiled doesn't have tcpsvd. I'd prefer not to recompile code since this is for demonstrating a "hack" on a remote device and want to demonstrate what can be done with what's available. are there any other options to send or receive files? – user1207381 Feb 26 '17 at 22:08
  • @user1207381 dropbear(ssh), netcat, tftp, wget, telnet – cde Mar 04 '20 at 06:49
0

allow anonymous read/write

tsu

# ftpd                                                                                                                                                   
BusyBox v1.32.0-nethunter (2020-12-28 12:01:33 AEDT) multi-call binary.                                                                                                                   
                                                                                                                                                                                          
Usage: ftpd [-wvS] [-a USER] [-t N] [-T N] [DIR]                                                                                                                                          
                                                                                                                                                                                          
FTP server. Chroots to DIR, if this fails (run by non-root), cds to it.                                                                                                                   
Should be used as inetd service, inetd.conf line:                                                                                                                                         
        21 stream tcp nowait root ftpd ftpd /files/to/serve                                                                                                                               
Can be run from tcpsvd:                                                                                                                                                                   
        tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve                                                                                                                                        
                                                                                                                                                                                          
        -w      Allow upload                                                                                                                                                              
        -A      No login required, client access occurs under ftpd's UID
        -a USER Enable 'anonymous' login and map it to USER
        -v      Log errors to stderr. -vv: verbose log
        -S      Log errors to syslog. -SS: verbose log
        -t,-T N Idle and absolute timeout


busybox tcpsvd -vE 0.0.0.0 21 ftpd -w -A /data/data/com.termux/files/home

CS QGB
  • 101
  • 1