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/
It seems your host machine does not allow capability switching.
You could modify the
optflagsin the source package forpure-ftpdby adding--without-capabilitiesSteps to add in your Docker file
rulesfile, append with sed the--without-capabilitiesoptionsdpkg-buildpackage -b -ucto build the package and install it withdpkg -iThis should do the trick.