# Pure FTP server started by xinetd wont read conf.d/pure-ftpd

## samwiseuk

I installed gentoo a few weeks ago and have been trying to setup an FTP server but have been struggling to understand how the particular package I've installed is configured.

After reading recommendations from these forums, I went with Pure FTP and emerged version 1.0.16b.  I've been struggling getting the server to accept my configuration and allow logins, however, so I forced an upgrade to 1.0.16c, after reading how this had helped with someone else's problems.  I finally have it running and it will allow me to login.

However, here's the thing: I need to restrict the passive mode ports to a certain range (using the -p flag).  The server will not follow this directive if I place it in the /etc/conf.d/pure-ftp config file.  It will only read it if it's in my /etc/xinetd.d/pure-ftp launcher file.

So, why isn't the /etc/conf.d/pure-ftpd config file read when the process is started by xinetd?  :Question: 

Any help appreciated!

Sam.

----------

## banadushi

/etc/conf.d/pure-ftpd is only read by the startup script for running pure-ftpd as a standalone server.  If running through xinetd you need to edit the /etc/xinetd.d/pure-ftpd and modify the server line to call the binary with your options such as:

server           = /usr/sbin/pure-ftpd -p [value]

of course editing [value] to suite your needs.

l8

Jason

----------

## samwiseuk

Ah.  Exactly the conclusion I'd arrived at.  I just wish I'd known that when I first installed pure.  I wonder now if the upgrade to 1.0.16c was actually necessary or just a problem because I had all the configuration in the conf.d/pure-ftpd file at the time.

hmm ... pity there's no way for me to go back to the original config.

ah, well.

Thanks!

Sam.

----------

## redmoth

there is an option in xinetd that allows you to add those switches called server_args

in other words you add a line in the format 'server_args = -p [value]' so that you can add the passive port range

inside the file /set/xinetd.d/pure-ftpd/ it might look like this (to beat a dead horse)

```

service ftp

{

        socket_type = stream

        server = /usr/sbin/pure-ftpd

        server_args = -a 408 -c 5 -i -F /root/FTPmessage -R -O clf:/var/log/pureftpd.log -N

        protocol = tcp

        user = root

        wait = no

        disable = no

        only_from 0.0.0.0/0

}

```

-redmoth

----------

