ftpdebiandockerpureftpd

Installing pure-ftpd in docker (Debian wheezy), error 421


i'm trying to setup a simple container i docker with pure-ftpd running.

But on running service pure-ftpd start i get this error:

Starting ftp server: Running: /usr/sbin/pure-ftpd -l pam -E -8 UTF-8 -O clf:/var/log/pure-ftpd/transfer.log -u 1000 -B
421 Unable to switch capabilities : Operation not permitted

Here's the Dockerfile for testing this:

FROM debian:wheezy

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update
RUN apt-get install -y pure-ftpd-common pure-ftpd

CMD service pure-ftpd start && \
    /bin/bash

EXPOSE 21/tcp

In this test i'm using debian wheezy, but i've tried with ubuntu too and i get exact the same error.


[ Edit ]

Working version with this fix is now available here: https://index.docker.io/u/stilliard/pure-ftpd/


Solution

  • It seems your host machine does not allow capability switching.

    You could modify the optflags in the source package for pure-ftpd by adding --without-capabilities

    Steps to add in your Docker file

    This should do the trick.