today test pure-ftpd again in a fress install pf.conf is default, not touch anything in system pure_ftpd other option(style) not work!
---- login as: root root@10.0.0.163's password: Last login: Tue Sep 24 17:42:39 2013 from 10.0.0.88 OpenBSD 5.4-current (GENERIC.MP) #61: Mon Sep 23 15:44:45 MDT 2013 Welcome to OpenBSD: The proactively secure Unix-like operating system. Please use the sendbug(1) utility to report bugs in the system. Before reporting a bug, please try to reproduce it with the latest version of the code. With bug reports, please try to ensure that enough information to reproduce the problem is enclosed, and if a known fix for it exists, include that as well. # cd /root # vi .profile # . /root/.profile # pkg_add pure-ftpd Ambiguous: choose package for pure-ftpd a 0: <None> 1: pure-ftpd-1.0.36p2 2: pure-ftpd-1.0.36p2-ldap 3: pure-ftpd-1.0.36p2-ldap-virtual_chroot 4: pure-ftpd-1.0.36p2-mysql 5: pure-ftpd-1.0.36p2-mysql-virtual_chroot 6: pure-ftpd-1.0.36p2-postgresql 7: pure-ftpd-1.0.36p2-postgresql-virtual_chroot 8: pure-ftpd-1.0.36p2-virtual_chroot Your choice: 8 pure-ftpd-1.0.36p2-virtual_...:libiconv-1.14p0: ok pure-ftpd-1.0.36p2-virtual_chroot: ok The following new rcscripts were installed: /etc/rc.d/pure_ftpd See rc.d(8) for details. Just found a interesting thing!!!! /etc/rc.d/pure_ftpd is in "bin" group but all other scripts in rc.d in "wheel" group ? # ls -l /etc/rc.d/pure_ftpd -r-xr-xr-x 1 root bin 228 Sep 20 22:36 pure_ftpd # /etc/rc.d/pure_ftpd start pure_ftpd(ok) # ps -auwx | grep ftpd root 30359 0.0 0.0 788 1292 ?? Ss 9:31AM 0:00.00 pure-ftpd: -pu re-ftpd (SERVER) (pure-ftpd) root 23216 0.0 0.0 448 904 p0 S+ 9:31AM 0:00.00 grep ftpd # ftp localhost Trying 127.0.0.1... Connected to localhost. 220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- 220-You are user number 1 of 50 allowed. 220-Local time is now 09:32. Server port: 21. 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 15 minutes of inactivity. Name (localhost:root): ^C# # vi /etc/rc.d/pure_ftpd # # /etc/rc.d/pure_ftpd stop pure_ftpd(ok) # ps -auwx | grep ftpd root 15167 0.0 0.0 244 252 p0 R+/1 9:33AM 0:00.00 grep ftpd # /etc/rc.d/pure_ftpd start pure_ftpd(ok) # ps -auwx | grep ftpd root 11999 0.0 0.0 716 980 ?? Ss 9:33AM 0:00.00 /usr/local/sbin/pure-ftpd -o -A -B -H -u1000 root 21498 0.0 0.0 252 224 p0 R+/1 9:33AM 0:00.00 grep ftpd # ftp localhost Trying 127.0.0.1... ftp: connect to address 127.0.0.1: Connection refused Trying ::1... ftp: connect: Connection refused ftp> exit # sysctl kern.version kern.version=OpenBSD 5.4-current (GENERIC.MP) #61: Mon Sep 23 15:44:45 MDT 2013 t...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP # pkg_info athn-firmware-1.1p0 firmware binary images for athn(4) driver libiconv-1.14p0 character set conversion library pure-ftpd-1.0.36p2-virtual_chroot small, easy to set up, fast and very secure FTP server radeondrm-firmware-20130808 firmware binary images for radeondrm(4) driver # cat /etc/pf.conf # $OpenBSD: pf.conf,v 1.52 2013/02/13 23:11:14 halex Exp $ # # See pf.conf(5) for syntax and examples. # Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1 # in /etc/sysctl.conf if packets are to be forwarded between interfaces. # increase default state limit from 10'000 states on busy systems #set limit states 100000 set skip on lo # filter rules and anchor for ftp-proxy(8) #anchor "ftp-proxy/*" #pass in quick inet proto tcp to port ftp divert-to 127.0.0.1 port 8021 # anchor for relayd(8) #anchor "relayd/*" block # block stateless traffic pass # establish keep-state # rules for spamd(8) #table <spamd-white> persist #table <nospamd> persist file "/etc/mail/nospamd" #pass in on egress proto tcp from any to any port smtp \ # rdr-to 127.0.0.1 port spamd #pass in on egress proto tcp from <nospamd> to any port smtp #pass in log on egress proto tcp from <spamd-white> to any port smtp #pass out log on egress proto tcp to any port smtp #block in quick from urpf-failed to any # use with care # By default, do not permit remote connections to X11 block in on ! lo0 proto tcp to port 6000:6010 # cat /etc/rc.d/pure_ftpd #!/bin/sh # # $OpenBSD: pure_ftpd.rc,v 1.1 2011/04/25 09:26:47 sthen Exp $ daemon="/usr/local/sbin/pure-ftpd" daemon_flags="-o -A -B -H -u1000" . /etc/rc.d/rc.subr pexp="pure-ftpd: -pure-ftpd \(SERVER\)" rc_reload=NO rc_cmd $1 # fstat USER CMD PID FD MOUNT INUM MODE R/W SZ|DV root fstat 22374 text /usr 181962 -r-xr-xr-x r 24440 root fstat 22374 wd / 103968 drwxr-xr-x r 1536 root fstat 22374 0 / 78522 crw--w---- rw ttyp0 root fstat 22374 1 / 78522 crw--w---- rw ttyp0 root fstat 22374 2 / 78522 crw--w---- rw ttyp0 root pure-ftpd 11999 text /usr/local 259843 -r-xr-xr-x r 168344 root pure-ftpd 11999 wd / 2 drwxr-xr-x r 512 root pure-ftpd 11999 0 / 79177 crw-rw-rw- r null root pure-ftpd 11999 1 / 79177 crw-rw-rw- w null root pure-ftpd 11999 2 / 79177 crw-rw-rw- w null root pure-ftpd 11999 3* unix dgram 0xffff80000059e800 <-> 0xffff800000541f80 root pure-ftpd 11999 4 /var 1247251 -rw------- rw 0 root ksh 8331 text / 26004 -r-xr-xr-x r 431312 root ksh 8331 wd / 103968 drwxr-xr-x r 1536