docker-pure-ftpd icon indicating copy to clipboard operation
docker-pure-ftpd copied to clipboard

CertFileAndKey doesn't work

Open tailtwo opened this issue 5 years ago • 4 comments

Hello,

I'm trying to use LetsEncrypt certificate for my FTP pod. My first idea was to use the CertFileAndKey parameter to use the certificate and key that I mounted into the container. So I mounted this configmap in /etc/pure-ftpd/conf/CertFileAndKey :

  CertFileAndKey: |
    "/etc/ssl/private/pure-ftpd.pem" "/etc/ssl/private/pure-ftpd.key"

But when I launch the pod, it crashes without error :

Log enabled, see /var/log/messages
rsyslogd: imklog: cannot open kernel log (/proc/kmsg): Operation not permitted.
rsyslogd: activation of module imklog failed [v8.1901.0 try https://www.rsyslog.com/e/2145 ]
tail: cannot open '/var/log/pure-ftpd/pureftpd.log' for reading: No such file or directory
Setting default port range to: 40080:40100
Setting default max clients to: 20
Setting default max connections per ip to: 20
Starting Pure-FTPd:
  pure-ftpd  -l puredb:/etc/pure-ftpd/pureftpd.pdb -E -j -R -P X.X.X.X -d -d -O w3c:/var/log/pure-ftpd/transfer.log --tls=0  -p 40080:40100 -c 20 -C 20

However it seems to work fine when I concatenate the key with the cert, so it looks like CertFileAndKey is not working properly.

tailtwo avatar Dec 10 '20 11:12 tailtwo

Hi @tailtwo

We don't currently support the /etc/pure-ftpd/conf directory, please try the flags instead: https://github.com/stilliard/docker-pure-ftpd#all-pure-ftpd-flags-available Hope this helps.

stilliard avatar Dec 10 '20 11:12 stilliard

Looks like there isn't a flag for what I am trying to achieve.

tailtwo avatar Dec 10 '20 11:12 tailtwo

Ah ok, sorry would like to come back and work on a script to parse the conf folder similar to how debian/ubuntu does normally but for the docker container but not had time to work on this atm. You could maybe take a look at how they handle that in their script to work around this maybe

stilliard avatar Dec 10 '20 11:12 stilliard

Thank you, I'll take a look at it. I think this issue can be closed then.

tailtwo avatar Dec 10 '20 11:12 tailtwo