Gentoo Archives: gentoo-user

From: David Haller <gentoo@×××××××.de>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] [SOLVED] vsftpd anonymous upload illegal PORT command
Date: Wed, 09 Aug 2017 14:30:30
Message-Id: 20170809143013.rewlxpbwf2ggntmu@grusum.endjinn.de
In Reply to: [gentoo-user] [SOLVED] vsftpd anonymous upload illegal PORT command by Walter Dnes
1 Hello,
2
3 On Tue, 08 Aug 2017, Walter Dnes wrote:
4 >> Try a:
5 >>
6 >> ftp> cd incoming
7 >
8 > Thank you, that was it. I just pushed over a file from a Gentoo
9 >machine to my desktop for a test. The OS/2 Warp ftp client still
10 >doesn't work, but that's probably a VM networking issue. There are
11 >other ways of getting data from inside the VM to the host machine, then
12 >I can ftp from there.
13 >
14 > Annoying "feature"... if I set "anon_root=/home/ftp/incoming/", then
15 >vsftpd refuses to run, complaining about a writable chroot directory.
16
17 Yeah, it's all about the writeable root (of the chroot). Whichever
18 path that is. Writeable chroot-root is just a "no-no" ;) And having
19 those rights on /incoming is quite sane...
20
21 >So I have to do an anonymous login, starting of in /home/ftp/ and then
22 >manually "cd incoming".
23
24 Or just add the target-dir at the end of the 'put foo /incoming/'.
25
26 And have a look at your client configuration ... For the plain
27 net-ftp/ftp client, it's ~/.netrc (see 'man 5 netrc'). Uhhm, that's
28 not quite intuitive to use... So here's a working example:
29
30 ==== ~/.netrc ====
31 machine localhost
32 login anonymous password "test@localhost"
33 macdef init
34 pwd
35 cd /incoming
36 pwd
37
38
39 default login anonymous password "invalid@×××××××.invalid"
40 ====
41
42 That way, you'd be auto-logged-in and auto-chdired to incoming on
43 localhost. Ain't that nice? You could add more commands to that
44 init-macro... Like a 'put foo' ;) Add a host-alias to your /etc/hosts
45 use that for a 'machine foo' directive in your .netrc and *tada* all
46 can be automated ;) That's Unix: a large box of pieces that can all
47 be combined creatively - or less so.
48
49 The 'pwd' are just for debugging (and the macro-definition (here the
50 special init macro) ends at the empty line). That should get you
51 started :)
52
53 Anyway, TUI/GUI clients like ncftp and gftp often have similar
54 features... Or even read ~/.netrc.
55
56 HTH,
57 -dnh, lovin' it to know the basics, learned in the 90ies, still valid
58 today ...
59
60 --
61 Truth's a bitch. -- Beka Valentine, Andromeda 3x04 - "Cui Bono"