我有一个支持 busybox 的嵌入式系统。我试图运行 FTP 服务器,以便可以编辑文件并将数据上传到我的嵌入式系统。但是当我运行
busybox ftpd -w /
它告诉我我需要使用 inetd 并将其放入 conf 中。但出于多种原因,我不想这样做。当我尝试 busybox 链接页面中给出的 tcpvd 时,我得到了命令未定义。有什么建议吗?
答案1
您是否尝试过这个命令:
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
应该用作 inetd 服务。ftpd 的行inetd.conf
:
21 stream tcp nowait root ftpd ftpd /files/to/serve
它也可以从以下位置运行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
答案2
允许匿名读/写
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