2

I am running pure-ftpd on raspbian, I need to pass it parameters to specify the port range for data connections, I read the following page here

pure-ftpd faq

it mentions that I can run the process directly like below..

Example: /usr/local/sbin/pure-ftpd -p 50000:50400

I believe the way to start and stop the services is as below

 sudo service pure-ftpd start

How can I pass it parameters ?

Jeff Schaller
  • 66,199
  • 35
  • 114
  • 250
Ahmed
  • 227
  • 2
  • 10

1 Answers1

2

I have solved it, it was not straight forward but after a analyzing the script that runs that service of pure-ftpd, i figure that the script

  /etc/init.d/pure-ftpd

starts another script called

 pure-ftpd-wrapper

Looking at this script it apprears to read some configuration values from disk, then searching for manpage of pure-ftpd-wrapper took me to page pure-ftpd-wrapper manpage Here we can see that configs are palace in directory

  /etc/pure-ftpd/conf

Here in this directory there is one file for each parameter of the executable So all I had to do was create a file by the name of

  PassivePortRange

In the conf directory and then put my port numbers seperated by space in there

  echo "50000 50100" > /etc/pure-ftpd/conf/PassivePortRange

After this change service must be restarted for the changes to take effect

  sudo service pure-ftpd restart

Done! Now you can access your ftp service even if it is behind a NAT/Firewall assuming you have done port forwarding for port 21 and the above range of ips and use passive mode in the ftp client.

Ahmed
  • 227
  • 2
  • 10