docker-pureftpd icon indicating copy to clipboard operation
docker-pureftpd copied to clipboard

Enables the pure-ftpwho tool ...

Open mhubig opened this issue 8 years ago • 5 comments

In order to get the pure-ftpwho command working I needed to recompile pure-ftpd with the --with-ftpwho option ...

mhubig avatar Sep 09 '16 11:09 mhubig

Hi, thanks for the PR! Two questions:

  • is the FEAT command necessary for pure-ftpwho to work?
  • what's the reason for changing the password database and config filenames?

gimoh avatar Sep 12 '16 13:09 gimoh

is the FEAT command necessary for pure-ftpwho to work?

Nop, it's just good behavior ...

what's the reason for changing the password database and config filenames?

I set the pathnames to the default ones, this way I don't need to supply the pathnames to e.g. pure-pw ...

mhubig avatar Sep 12 '16 13:09 mhubig

Um, you shouldn't need to supply paths to pure-pw, etc. as it checks the env variables (PURE_DBFILE and PURE_PASSWDFILE), see README.VirtualUsers at the bottom in ENVIRONNEMENT VARIABLES section.

This was the reason for defining them and making sure they are loaded whatever way a shell session might be started.

As for pure-ftpwho and not using minimal, I'll see if we can maybe have two packages upstream in alpine, one minimal and one full blown. For our use case minimal was actually preferred.

gimoh avatar Sep 14 '16 09:09 gimoh

Um, you shouldn't need to supply paths to pure-pw, etc. as it checks the env variables (PURE_DBFILE and PURE_PASSWDFILE) ... This was the reason for defining them and making sure they are loaded whatever way a shell session might be started.

Hmm, I see but they are not set if I use exec to connect to the container. Maybe it's better to set them within the Dockerfile ...

~ ❯❯❯ docker run -d -p 21:21 -p 50000-50020:50000-50020 --name ftpd -e PURE_USERS=isolated+noanon -e PURE_VIRT_USER_HOME_PATTERN=/srv/ftp/@USER@/./@USER@ gimoh/pureftpd -p 50000:50020 -P 127.0.0.1 -j -c 50 -C 5
d48865511eb2bd6ec5eb5f94eca62b2948fcca87fea12f6b6cee60e3e7545368
~ ❯❯❯ docker exec -it ftpd sh
/ # env
no_proxy=*.local, 169.254/16
HOSTNAME=d48865511eb2
SHLVL=1
HOME=/root
PUREFTPD_VERSION=1.0.42-r0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PURE_CONFDIR=/etc/pureftpd
PURE_USERS=isolated+noanon
PURE_VIRT_USER_HOME_PATTERN=/srv/ftp/@USER@/./@USER@
SYSLOG_STDOUT_VERSION=1.1.1
PWD=/

mhubig avatar Sep 14 '16 10:09 mhubig