Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/

like image 793
stilliard Avatar asked May 29 '14 09:05

stilliard


1 Answers

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

  • apt-get source pure-ftpd
  • in the rules file, append with sed the --without-capabilities options
  • use dpkg-buildpackage -b -uc to build the package and install it with dpkg -i

This should do the trick.

like image 183
Panagiotis Moustafellos Avatar answered Sep 21 '22 20:09

Panagiotis Moustafellos