On 2014-01-11 Sat 18:35 PM |, Craig R. Skinner wrote: > $HOME of /var/spool/ftp instead of /home/ftp > > $SHELL of /sbin/nologin instead of /usr/bin/false > > 'useradd' instead of 'adduser', which sets a /home prefix > > Change the 'Directory Setup' section as the existing article duplicates > what's in the default /var/spool/ftp/, and set up a local OpenBSD ftp > mirror. >
Whoops, evidence it works: $ grep ^/ /etc/shells /bin/sh /bin/csh /bin/ksh /bin/rksh $ sudo userinfo ftp Password: login ftp passwd ************* uid 212121 groups ftp change NEVER class gecos anonymous ftp dir /var/spool/ftp shell /sbin/nologin expire NEVER $ grep ^ftp /etc/inetd.conf ftp stream tcp nowait root /usr/libexec/ftpd ftpd -4AlUS $ cd $(mktemp -d) $ ls $ ftp -a ftp://localhost/pub/OpenBSD/5.4/ANNOUNCEMENT Connected to localhost.britvault.co.uk. 220 palm.britvault.co.uk FTP server ready. 331 Guest login ok, send your email address as password. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. 200 Type set to I. 250 CWD command successful. Retrieving pub/OpenBSD/5.4/ANNOUNCEMENT local: ANNOUNCEMENT remote: ANNOUNCEMENT 150 Opening BINARY mode data connection for 'ANNOUNCEMENT' (25686 bytes). 100% |************************************************************************************************| 25686 00:00 226 Transfer complete. 25686 bytes received in 0.03 seconds (867.99 KB/s) 221 Goodbye. $ ftp -a ftp://localhost/pub/OpenBSD/5.4/ports.tar.gz Connected to localhost.britvault.co.uk. 220 palm.britvault.co.uk FTP server ready. 331 Guest login ok, send your email address as password. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. 200 Type set to I. 250 CWD command successful. Retrieving pub/OpenBSD/5.4/ports.tar.gz local: ports.tar.gz remote: ports.tar.gz 150 Opening BINARY mode data connection for 'ports.tar.gz' (22457239 bytes). 100% |************************************************************************************************| 21930 KB 00:03 226 Transfer complete. 22457239 bytes received in 3.28 seconds (6.53 MB/s) 221 Goodbye. $ ftp -a ftp://localhost/pub/OpenBSD/5.4/packages/i386/passwdqc* Connected to localhost.britvault.co.uk. 220 palm.britvault.co.uk FTP server ready. 331 Guest login ok, send your email address as password. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. 200 Type set to I. 250 CWD command successful. Retrieving pub/OpenBSD/5.4/packages/i386/passwdqc* local: passwdqc-1.3.0.tgz remote: passwdqc-1.3.0.tgz 150 Opening BINARY mode data connection for 'passwdqc-1.3.0.tgz' (37483 bytes). 100% |************************************************************************************************| 37483 00:00 226 Transfer complete. 37483 bytes received in 0.01 seconds (5.89 MB/s) 221 Goodbye. $ ftp -a ftp://localhost/pub/Sun/patches/1086* Connected to localhost.britvault.co.uk. 220 palm.britvault.co.uk FTP server ready. 331 Guest login ok, send your email address as password. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. 200 Type set to I. 250 CWD command successful. Retrieving pub/Sun/patches/1086* local: 108620-04.tar.Z remote: 108620-04.tar.Z 150 Opening BINARY mode data connection for '108620-04.tar.Z' (35733 bytes). 100% |************************************************************************************************| 35733 00:00 226 Transfer complete. 35733 bytes received in 0.02 seconds (1.81 MB/s) local: 108673-02.tar.Z remote: 108673-02.tar.Z 150 Opening BINARY mode data connection for '108673-02.tar.Z' (772029 bytes). 100% |************************************************************************************************| 753 KB 00:00 226 Transfer complete. 772029 bytes received in 0.08 seconds (8.78 MB/s) 221 Goodbye. $ ls -l total 45672 -rw-r----- 1 me wheel 35733 May 11 2009 108620-04.tar.Z -rw-r----- 1 me wheel 772029 May 11 2009 108673-02.tar.Z -rw-r----- 1 me wheel 25686 Oct 25 19:56 ANNOUNCEMENT -rw-r----- 1 me wheel 37483 Nov 28 22:26 passwdqc-1.3.0.tgz -rw-r----- 1 me wheel 22457239 Jul 30 00:47 ports.tar.gz $ tail -n 5 /var/log/ftpd Mon Jan 13 14:23:27 2014 1 localhost 25686 /pub/OpenBSD/5.4/ANNOUNCEMENT b * o a me@ ftp 0 * Mon Jan 13 14:23:53 2014 4 localhost 22457239 /pub/OpenBSD/5.4/ports.tar.gz b * o a me@ ftp 0 * Mon Jan 13 14:28:35 2014 1 localhost 37483 /pub/OpenBSD/5.4/packages/i386/passwdqc-1.3.0.tgz b * o a me@ ftp 0 * Mon Jan 13 14:31:31 2014 1 localhost 35733 /pub/Sun/patches/108620-04.tar.Z b * o a me@ ftp 0 * Mon Jan 13 14:31:31 2014 1 localhost 772029 /pub/Sun/patches/108673-02.tar.Z b * o a me@ ftp 0 * $ last ftp ftp localhost Mon Jan 13 14:31 - 14:31 (00:00) ftp ftp localhost Mon Jan 13 14:28 - 14:28 (00:00) ftp ftp localhost Mon Jan 13 14:23 - 14:23 (00:00) ftp ftp localhost Mon Jan 13 14:23 - 14:23 (00:00) ... ... Cheers, -- Craig Skinner | http://web.hope-church-falkirk.org.uk/