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

I am trying to configure a simple container i'm docker with running pure-ftpd.

But when service pure-ftpd startI 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 checking 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 use debian wheezy, but I also tried with ubuntu, and I get the exact same error.


[Change]

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

+4
source share
1 answer

Your host computer does not seem to allow switching capabilities.

You can change optflagsin the source package for pure-ftpdby adding--without-capabilities

Steps to Add to Docker File

  • apt-get source pure-ftpd
  • rules, sed --without-capabilities options
  • dpkg-buildpackage -b -uc dpkg -i

.

+4

Source: https://habr.com/ru/post/1542446/


All Articles