On Thursday 03 September 2009 05:25, John Williams wrote:
> Hi
> 
> We're using busybox 1.14.3 on MicroBlaze w/MMU, and all is working
> nicely except a couple of minor issues.  First off the rank, in ftpd
> we see the following:
> 
>  * auth: When connecting to the target, we can login as anyone,
> regardless of whether they appear in /etc/password or not.  e.g.
> 
> [jwilli...@petalogix-ws1 petalinux-dist]$ ftp 192.168.0.11
> Connected to 192.168.0.11.
> 220 Operation successful
> 500 Unknown command
> 500 Unknown command
> KERBEROS_V4 rejected as an authentication type
> Name (192.168.0.11:jwilliams): fooble
> 230 Operation successful
> Remote system type is UNIX.
> Using binary mode to transfer files.

Yes. busybox's ftpd has only anonymous mode.
In order to keep code small, it does not bother to
check usernames. So, you don't even need to login
as "anonymous", and username will do.
In fact, you don't even need to login.
You can connect and immediately start downloading stuff,
without issuing USER or PASS commands.


>  * put: - the put command doesn't work:
> ftp> put README
> local: README remote: README
> 227 PASV ok (192,168,0,11,200,218)
> 500 Unknown command

It is described in the usage text. You need to use -w option:

# ftpd --help
BusyBox v1.16.0.git (2009-08-30 17:07:12 CEST) multi-call binary

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

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

Options:
        -w      Allow upload
        -v      Log to stderr
        -S      Log to syslog
        -t,-T   Idle and absolute timeouts
        DIR     Change root to this directory



If you do so, also use DIR, or else users will be able
to overwrite any file on the filesystem using ftp upload.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to