A small error in the Pure-FTPd configuration file, due to which I lost an hour

    So, I, like many, use the excellent Pure-FTPd ftp server . However, today I was faced with some trouble ...


    In general, this was the case. I installed Pure-FTPd on the machine, got virtual users. Checked, everything worked perfectly. Lift, a firewall in which opened 21 ports. It stopped working, absolutely ... Well, of course, you still have to open PassivePortRange in the firewall to send data. Open the configuration file Pure-FTPd and see the following.
    1. # Port range for passive connections replies. - for firewalling.
    2. # PassivePortRange 30000 50000

    Have you looked carefully? Well, respectively, uncomment and get.
    1. # Port range for passive connections replies. - for firewalling.
    2. PassivePortRange 30000 50000

    We restart Pure-FTPd, add rules for skipping data for these ports to the firewall. Trying ... doesn't work! Hmm, that is, it works, you can connect, but the data goes through time ... Strange.
    Turn on the head. We understand that the firewall passes through once. But how can this be? We open the log and see that for some reason, the data we get is not only on ports 30,000: 50,000, but also on some others. How can this be? We set them in the configuration file!
    We launch the excellent pure-config-args utility  .
    1. request:/etc/pure-ftpd pure-config-args pure-ftpd.conf
    2. -A -c10 -B -C3 -z -D -e -fftp -H -I15 -lpam -L2000:8 -m4 -s -U177:077 -u40 -x -r -i -k99 -G -Z

    Well, where are our ports? A? Open the config again and write.
    1. # Port range for passive connections replies. - for firewalling.
    2. PassivePortRange 30000:50000

    Everyone noticed that “:” appeared. And now everything is fine with us. And the ports appeared in the config, and of course it worked all at once. Of course, intellectually, a range is always written with a “:”, but not with a space. But, when you see that in clean, I would even say the virgin configuration file is a space, then you write a space.
    Conclusion: do not believe virgin configs and rtfm!

    PS I have Pure-FTPd 1.0.21–182.32.1 , the system is OpenSuse 11.1
    PPS Moved to Open Source. Made a bug report.
    PPPS Frank (the main developer of Pure-FTPd) just wrote to me, said that this jamb in the whole version, and not just in OpenSuse, will be fixed in the next build.

    Also popular now: