Giter Club home page Giter Club logo

docker-pure-ftpd's Introduction

Latest Version Build Status Docker Stars Docker Pulls
Become a sponsor Donate Paypal

About

Pure-FTPd Docker image based with MySQL, PostgreSQL and LDAP support.

Tip

Want to be notified of new releases? Check out ๐Ÿ”” Diun (Docker Image Update Notifier) project!


Features

  • Multi-platform image
  • s6-overlay as process supervisor
  • PureDB, MySQL, PostgreSQL and LDAP support
  • Latest Pure-FTPd release compiled from source
  • Support of argon2 and scrypt hashing method through Libsodium
  • Logs processed to stdout through socklog-overlay
  • Support of pure-uploadscript
  • PASSIVE_IP for PASV support automatically resolved

Build locally

git clone https://github.com/crazy-max/docker-pure-ftpd.git
cd docker-pure-ftpd

# Build image and output to docker (default)
docker buildx bake

# Build multi-platform image
docker buildx bake image-all

Image

Registry Image
Docker Hub crazymax/pure-ftpd
GitHub Container Registry ghcr.io/crazy-max/pure-ftpd

Following platforms for this image are available:

$ docker run --rm mplatform/mquery crazymax/pure-ftpd:latest
Image: crazymax/pure-ftpd:latest
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/arm/v6
   - linux/arm/v7
   - linux/arm64
   - linux/386
   - linux/ppc64le

Environment variables

  • TZ: Timezone assigned to the container (default UTC)
  • AUTH_METHOD: Authentication method to use. Can be puredb, mysql, pgsql or ldap (default puredb)
  • SECURE_MODE: Enable secure mode (default true)
  • PASSIVE_IP: IP/Host for PASV support (default auto resolved with dig +short myip.opendns.com @resolver1.opendns.com)
  • PASSIVE_PORT_RANGE: Port range for passive connections (default 30000:30009)
  • DB_TIMEOUT: Time in seconds after which we stop trying to reach the database server. Only used for mysql and pgsql auth method (default 45)
  • UPLOADSCRIPT: What program/script to run after an upload. It has to be an absolute filename. (for example /data/uploadscript.sh)

โš ๏ธ Do not set --uploadscript flag. It will be added if UPLOADSCRIPT is defined.

Volumes

  • /data: Contains config files and PureDB file

Ports

  • 2100: FTP port
  • 30000-30009: PASV port range

Usage

Docker Compose

Docker compose is the recommended way to run this image. You can use the following compose template, then run the container:

docker compose up -d
docker compose logs -f

Command line

You can also use the following minimal command:

$ docker run -d --name pure-ftpd \
  -p 2100:2100 \
  -p 30000-30009:30000-30009 \
  -e "TZ=Europe/Paris" \
  -v $(pwd)/data:/data \
  crazymax/pure-ftpd

Upgrade

Recreate the container whenever I push an update:

docker compose pull
docker compose up -d

Notes

Flags

This image uses flags instead of the configuration file to set Pure-FTPd. Some flags are forced but you can pass additional flags in /data/pureftpd.flags file:

-d
-d
--maxclientsperip 5
--minuid 100
--limitrecursion 10000:3

Secure mode

SECURE_MODE enables specially crafted flags to enforced security of Pure-FTPd.

PureDB authentication method

Using PureDB authentication method, the container will create a blank password file in /data/pureftpd.passwd and a initialize a PureDB database in /data/pureftpd.pdb. If a password file is already available, it will be read on startup and the PureDB database will be updated.

At first execution of the container no user will be available and you will have to create one:

$ docker compose exec pureftpd pure-pw useradd foo -u 1003 -g 1005 -d /home/foo -m
Password:
Enter it again:
$ docker compose exec pureftpd pure-pw list
foo                 /home/foo/./
$ cat ./data/pureftpd.passwd
foo:$2a$10$Oqn7I2P7YaGxQrtuydcDKuxmCJqPR7a79EeDy2gChyOGEnYA4UIPK:1003:1005::/home/foo/./::::::::::::

User foo will be created with uid 1003, gid 1005 with his home directory located at /home/foo. The password will be asked after. More info about local users database: https://github.com/jedisct1/pure-ftpd/blob/master/README.Virtual-Users

Persist FTP user home

Looking at the previous example, don't forget to persist the home directory through a named or bind mounted volume like:

version: "3.2"

services:
  pureftpd:
    image: crazymax/pure-ftpd
    container_name: pureftpd
    ports:
      - "2100:2100"
      - "30000-30009:30000-30009"
    volumes:
      - "./data:/data"
      - "./foo:/home/foo"
    environment:
      - "TZ=Europe/Paris"
      - "AUTH_METHOD=puredb"
    restart: always

MySQL authentication method

A quick example to use MySQL authentication method is also available using a MariaDB container. Before using starting the container, a MySQL configuration file must be available in /data/pureftpd-mysql.conf.

In the docker compose example available, the database and the users table will be created at first launch.

To create your first user you can use this one line command:

$ docker compose exec db mysql -u pureftpd -p'asupersecretpassword' -e "INSERT INTO users (User,Password,Uid,Gid,Dir) VALUES ('foo',ENCRYPT('test'),'1003','1005','/home/foo');" pureftpd
$ docker compose exec db mysql -u pureftpd -p'asupersecretpassword' -e "SELECT * FROM users;" pureftpd
+------+---------------+------+------+-----------+
| User | Password      | Uid  | Gid  | Dir       |
+------+---------------+------+------+-----------+
| foo  | Oo4cJdd1HNVA6 | 1003 | 1005 | /home/foo |
+------+---------------+------+------+-----------+

User foo will be created with uid 1003, gid 1005 with his home directory located at /home/foo. Here we assume crypt is the MySQLCrypt method and the password test is hashed using crypt. More info about MySQL authentication method: https://github.com/jedisct1/pure-ftpd/blob/master/README.MySQL

PostgreSQL authentication method

Like MySQL, there is also a quick example to use PostgreSQL authentication method using a PostgreSQL container. And also before starting the container, a PostgreSQL configuration file must be available in /data/pureftpd-pgsql.conf.

In the docker compose example available, the database and the users table will be also created at first launch.

How add new user with encrypted password?

CREATE EXTENSION pgcrypto;
INSERT INTO "users" ("User", "Password", "Dir") VALUES ('foo', crypt('mypassword', gen_salt('bf')), '/home/foo');

More info about PostgreSQL authentication method: https://github.com/jedisct1/pure-ftpd/blob/master/README.PGSQL

TLS connection

TLS connections require certificates, as well as their key. Both can be bundled into a single file. If you have both a .pem file and a .key file, just concatenate the content of the .key file to the .pem file.

The certificate needs to be located in /data/pureftpd.pem and --tls <opt> added to enable TLS connection.

To get started, you can create a self-signed certificate with the following command:

docker run --rm -it --entrypoint '' -v $(pwd)/data:/data crazymax/pure-ftpd \
  openssl dhparam -out /data/pureftpd-dhparams.pem 2048
docker run --rm -it --entrypoint '' -v $(pwd)/data:/data crazymax/pure-ftpd \
  openssl req -x509 -nodes -newkey rsa:2048 -sha256 -keyout /data/pureftpd.pem -out /data/pureftpd.pem

Logs

Logs are displayed through stdout using socklog-overlay. You can increase verbosity with -d -d flags.

$ docker compose logs -f pureftpd
Attaching to pureftpd
pureftpd    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
pureftpd    | [s6-init] ensuring user provided files have correct perms...exited 0.
pureftpd    | [fix-attrs.d] applying ownership & permissions fixes...
pureftpd    | [fix-attrs.d] done.
pureftpd    | [cont-init.d] executing container initialization scripts...
pureftpd    | [cont-init.d] 01-config.sh: executing...
pureftpd    | Setting timezone to America/Edmonton...
pureftpd    | Use PureDB authentication method
pureftpd    | Flags
pureftpd    |   Secure:
pureftpd    |   Additional:
pureftpd    |   All: --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 90.101.64.158 --login puredb:/data/pureftpd.pdb
pureftpd    | [cont-init.d] 01-config.sh: exited 0.
pureftpd    | [cont-init.d] 02-service.sh: executing...
pureftpd    | [cont-init.d] 02-service.sh: exited 0.
pureftpd    | [cont-init.d] 03-uploadscript.sh: executing...
pureftpd    | [cont-init.d] 03-uploadscript.sh: exited 0.
pureftpd    | [cont-init.d] ~-socklog: executing...
pureftpd    | [cont-init.d] ~-socklog: exited 0.
pureftpd    | [cont-init.d] done.
pureftpd    | [services.d] starting services
pureftpd    | [services.d] done.
pureftpd    | ftp.info: May 21 18:09:56 pure-ftpd: ([email protected]) [INFO] New connection from 192.168.0.1
pureftpd    | ftp.info: May 21 18:09:56 pure-ftpd: ([email protected]) [INFO] foo is now logged in
pureftpd    | ftp.notice: May 21 18:10:17 pure-ftpd: ([email protected]) [NOTICE] /home/foo//unlock.bin uploaded  (1024 bytes, 448.83KB/sec)
...

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. You can also support this project by becoming a sponsor on GitHub or by making a PayPal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! ๐Ÿ™

License

MIT. See LICENSE for more details.

docker-pure-ftpd's People

Contributors

adamandersonmakeit avatar crazy-max avatar dependabot[bot] avatar sinacek avatar t0xa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-pure-ftpd's Issues

ARMv7 looks like not supported

Behaviour

HI, I tried to run the image on Raspberry Pi 2 - (standard installation with this instruction https://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2), without luck.

# docker run --rm mplatform/mquery crazymax/pure-ftpd:latest
Unable to find image 'mplatform/mquery:latest' locally
latest: Pulling from mplatform/mquery
db6020507de3: Pull complete 
f11a2bcbeb86: Pull complete 
Digest: sha256:e15189e3d6fbcee8a6ad2ef04c1ec80420ab0fdcf0d70408c0e914af80dfb107
Status: Downloaded newer image for mplatform/mquery:latest
Image: crazymax/pure-ftpd:latest
 * Manifest List: Yes
 * Supported platforms:
   - linux/amd64
   - linux/arm/v6
   - linux/arm/v7
   - linux/arm64
   - linux/386
   - linux/ppc64le

Steps to reproduce this issue

  1. Install fresh Arch Linux ARMv7 for Raspberry Pi 2
  2. Install docker
  3. Run the image

Expected behaviour

The image should run.

Actual behaviour

standard_init_linux.go:211: exec user process caused "exec format error"

Configuration

  • Docker version (type docker --version) : Docker version 19.03.11-ce, build 42e35e61f3
  • Docker compose version if applicable (type docker-compose --version) : docker-compose version 1.26.0, build unknown
  • Platform (Debian 9, Ubuntu 18.04, ...) : Arch Linux ARMv7
  • System info (type uname -a) : Linux alarmpi 5.4.42-1-ARCH #1 SMP PREEMPT Tue May 26 01:48:52 UTC 2020 armv7l GNU/Linux
  • Include all necessary configuration files : docker-compose.yml, .env, ... tried via docker run

Docker info

Client:
 Debug Mode: false

Server:
 Containers: 1
  Running: 0
  Paused: 0
  Stopped: 1
 Images: 1
 Server Version: 19.03.11-ce
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: journald
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d76c121f76a5fc8a462dc64594aea72fe18e1178.m
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 5.4.42-1-ARCH
 Operating System: Arch Linux ARM
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 932.5MiB
 Name: alarmpi
 ID: ZRS3:HVWG:3PWP:5PC2:ERST:W6EB:UKCB:J5VU:UAUE:FMPN:I37X:6SU7
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No memory limit support
WARNING: No swap limit support
WARNING: No kernel memory limit support
WARNING: No kernel memory TCP limit support
WARNING: No oom kill disable support

Logs

standard_init_linux.go:211: exec user process caused "exec format error"

Some log lines have the wrong timestamp.

Behaviour

Some log lines have timestamp according to TZ environment. Others have UTC timezone.

Steps to reproduce this issue

  1. docker run -ti --rm -p 21:2100 -e TZ=America/Edmonton crazymax/pure-ftpd:latest also tried "Europe/Paris"
  2. Initiate a connection: ftp localhost

Expected behaviour

All log lines should have Edmonton timestamp.

Actual behaviour

$ docker run -ti --rm -p 21:2100 -e TZ=America/Edmonton crazymax/pure-ftpd:latest
Use PureDB authentication method
Flags
  Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
  Additional:
  All: --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 205.234.47.168 --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login puredb:/data/pureftpd.pdb
2020-04-23 13:16:24,770 INFO Included extra file "/etc/supervisord/pure-ftpd.conf" during parsing
2020-04-23 13:16:24,771 INFO Included extra file "/etc/supervisord/syslog-ng.conf" during parsing
2020-04-23 13:16:24,771 INFO Set uid to user 0 succeeded
2020-04-23 13:16:24,772 INFO supervisord started with pid 1
2020-04-23 13:16:25,785 INFO spawned: 'pure-ftpd' with pid 13
2020-04-23 13:16:25,793 INFO spawned: 'syslog-ng' with pid 14
2020-04-23 13:16:26,797 INFO success: pure-ftpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-04-23 13:16:26,797 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Apr 23 19:16:47 cb3e7eba6d53 pure-ftpd: ([email protected]) [INFO] New connection from 172.17.0.1

13:16 is Edmonton time (-06:00) but the connection log lines have 19:16 (UTC) (and also are a different format. I'm not worried about that).

Configuration

  • Docker version (type docker --version) : Docker version 18.09.2, build 6247962
  • Docker compose version if applicable (type docker-compose --version) : docker-compose version 1.23.2, build 1110ad01
  • Platform (Debian 9, Ubuntu 18.04, ...) : ubuntu 18.10
  • System info (type uname -a) : Linux dsops 4.18.0-25-generic #26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
  • Include all necessary configuration files : docker-compose.yml, .env, ... โœ”

Docker info

Containers: 10
 Running: 0
 Paused: 0
 Stopped: 10
Images: 239
Server Version: 18.09.2
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.18.0-25-generic
Operating System: Ubuntu 18.10
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 7.767GiB
Name: dsops
ID: XKP4:MQJX:7T3C:V75Z:PXSI:GVO6:SRCZ:6YL4:HJPQ:DPOO:DK4A:WGLF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No swap limit support

Container Logs:

Another example using Paris TZ:

docker run -ti --rm -p 21:2100 -e TZ=Europe/Paris crazymax/pure-ftpd:latest
Use PureDB authentication method
Flags
  Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
  Additional:
  All: --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 205.234.47.168 --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login puredb:/data/pureftpd.pdb
2020-04-23 21:25:49,298 INFO Included extra file "/etc/supervisord/pure-ftpd.conf" during parsing
2020-04-23 21:25:49,298 INFO Included extra file "/etc/supervisord/syslog-ng.conf" during parsing
2020-04-23 21:25:49,298 INFO Set uid to user 0 succeeded
2020-04-23 21:25:49,301 INFO supervisord started with pid 1
2020-04-23 21:25:50,304 INFO spawned: 'pure-ftpd' with pid 14
2020-04-23 21:25:50,307 INFO spawned: 'syslog-ng' with pid 15
2020-04-23 21:25:51,309 INFO success: pure-ftpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-04-23 21:25:51,309 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Apr 23 19:26:02 f5be5c4b1865 pure-ftpd: ([email protected]) [INFO] New connection from 172.17.0.1
Apr 23 19:27:28 f5be5c4b1865 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [n]
Apr 23 19:27:29 f5be5c4b1865 pure-ftpd: ([email protected]) [INFO] Logout.
2020-04-23 21:27:30,817 INFO reaped unknown pid 18

uploadscript not work

Behaviour

when enable --uploadscript, error occured as following:
realpath() failure : [cs.txt] => [No such file or directory]

Steps to reproduce this issue

  1. enable --uploadscript to data/pureftpd.flags
  2. docker-compse up ( in examples/puredb directory)
  3. login docker , create /sbin/uploadscript.sh, the content is:
    #!/bin/sh
    echo "$1 has been uploaded" >> /tmp/ftp.log
  4. run /sbin/pure-uploadscript -B -r /sbin/uploadscript.sh
  5. using ftpclient longin and put a file

Expected behaviour

Tell me what should happen

  1. file upload succuess,
  2. /tmp/ftp.log should be create

Actual behaviour

  1. file upload fail
  2. no ftp.log created in /tmp
> Container logs
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [INFO] New connection from 192.168.1.11
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 220-You are user number 1 of 5 allowed.
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 220-Local time is now 05:43. Server port: 2100.
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 220-This is a private system - No anonymous login
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 220 You will be disconnected after 15 minutes of inactivity.
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] Command [opts] [UTF8 ON]
pureftpd    | May 16 05:43:27 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 504 Unknown command
pureftpd    | May 16 05:43:30 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] Command [user] [foo]
pureftpd    | May 16 05:43:30 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 331 User foo OK. Password required
pureftpd    | May 16 05:43:32 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
pureftpd    | May 16 05:43:32 b5fbb53f21f1 pure-ftpd: ([email protected]) [INFO] foo is now logged in
pureftpd    | May 16 05:43:32 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 230 OK. Current directory is /
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] Command [port] [192,168,1,11,206,141]
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 200 PORT command successful
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] Command [stor] [cs.PS]
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 150 Connecting to port 52877
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [NOTICE] /home/foo//cs.PS uploaded  (389639 bytes, 3403.34KB/sec)
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) **[ERROR] realpath() failure : [cs.PS] => [No such file or directory]**
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 226-File successfully transferred
pureftpd    | May 16 05:43:38 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 226 0.112 seconds (measured here), 3.32 Mbytes per second
pureftpd    | May 16 05:43:55 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] Command [quit] []
pureftpd    | May 16 05:43:55 b5fbb53f21f1 pure-ftpd: ([email protected]) [INFO] Logout.
pureftpd    | May 16 05:43:55 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 221-Goodbye. You uploaded 381 and downloaded 0 kbytes.
pureftpd    | May 16 05:43:55 b5fbb53f21f1 pure-ftpd: ([email protected]) [DEBUG] 221 Logout.
pureftpd    | 2020-05-16 05:43:55,169 INFO reaped unknown pid 27

FTP Client hanging at "Retrieving directory listing..."

Behaviour

Tried to use the postgres authentication

Steps to reproduce this issue

  1. Docker-Compose Template
version: "3.2"

services:
  pureftpd:
    image: crazymax/pure-ftpd
    container_name: pureftpd
    ports:
      - 2100:2100
      - 30000-30009:30000-30009
    volumes:
      - "./data:/data"
      - "/home/ftpusers:/home/ftpusers"
    environment:
      - "TZ=Europe/Paris"
      - "AUTH_METHOD=pgsql"
    restart: always

  1. data/pureftpd-pgsql.conf
PGSQLServer     192.168.1.8
PGSQLPort       5432
PGSQLUser       db_username
PGSQLPassword   db_password
PGSQLDatabase   database
PGSQLCrypt      any
PGSQLGetPW     SELECT password FROM users WHERE  username='\L'
PGSQLDefaultUID 1003
PGSQLDefaultGID 1003
PGSQLGetDir   select '/home/ftpusers/'||'\L' as Dir ;

  1. Used filezilla to login
host: 192.168.1.8 (localhost)
username: mannem
password: password
port: 2100

Expected behaviour

Used Filezilla to Login

  1. Successful login
  2. Auto create folder with login username
  3. Listing files
  4. Allow files to upload

Actual behaviour

  1. Login Successful
  2. Directory is created
  3. unable to retrieve directory listing

Filezilla Log

Status:	Disconnected from server
Status:	Connecting to 192.168.1.8:2100...
Status:	Connection established, waiting for welcome message...
Status:	Insecure server, it does not support FTP over TLS.
Status:	Logged in
Status:	Retrieving directory listing...
Command:	PWD
Response:	257 "/home/ftpusers/mannem" is your current location
Command:	TYPE I
Response:	200 TYPE is now 8-bit binary
Command:	PASV
Response:	227 Entering Passive Mode (122,172,42,239,117,50)
Command:	MLSD
Error:	Connection timed out after 20 seconds of inactivity
Error:	Failed to retrieve directory listing
Status:	Disconnected from server

Configuration

Docker version 19.03.6, build 369ce74a3c
docker-compose version 1.17.1, build unknown
Ubuntu 18.04
Linux machine 4.15.0-109-generic #110-Ubuntu SMP Tue Jun 23 02:39:32 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Docker info

Client:
 Debug Mode: false

Server:
 Containers: 54
  Running: 2
  Paused: 0
  Stopped: 52
 Images: 298
 Server Version: 19.03.6
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 
 runc version: 
 init version: 
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.15.0-109-generic
 Operating System: Ubuntu 18.04.4 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.687GiB
 Name: machine
 ID: 55M6:KP7S:IIDJ:ZX56:FTXK:2PQ3:FNRN:WQLY:SNMW:NLUW:ZX3Z:C5ZX
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Logs

Starting pureftpd ... 
Starting pureftpd ... done
Attaching to pureftpd
pureftpd    | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
pureftpd    | [s6-init] ensuring user provided files have correct perms...exited 0.
pureftpd    | [fix-attrs.d] applying ownership & permissions fixes...
pureftpd    | [fix-attrs.d] done.
pureftpd    | [cont-init.d] executing container initialization scripts...
pureftpd    | [cont-init.d] 01-config.sh: executing... 
pureftpd    | Setting timezone to Europe/Paris...
pureftpd    | Use PostgreSQL authentication method
pureftpd    | Waiting 45s for database to be ready...
pureftpd    | PostgreSQL database ready!
pureftpd    | Flags
pureftpd    |   Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
pureftpd    |   Additional: -d -d
pureftpd    |   All: -d -d --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 122.172.42.239 --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login pgsql:/data/pureftpd-pgsql.conf
pureftpd    | [cont-init.d] 01-config.sh: exited 0.
pureftpd    | [cont-init.d] 02-service.sh: executing... 
pureftpd    | [cont-init.d] 02-service.sh: exited 0.
pureftpd    | [cont-init.d] 03-uploadscript.sh: executing... 
pureftpd    | [cont-init.d] 03-uploadscript.sh: exited 0.
pureftpd    | [cont-init.d] ~-socklog: executing... 
pureftpd    | [cont-init.d] ~-socklog: exited 0.
pureftpd    | [cont-init.d] done.
pureftpd    | [services.d] starting services
pureftpd    | [services.d] done.
pureftpd    | ftp.info: Jul  7 04:39:09 pure-ftpd: ([email protected]) [INFO] New connection from 192.168.1.8
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 220-You are user number 1 of 5 allowed.
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 220-Local time is now 06:39. Server port: 2100.
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 220-This is a private system - No anonymous login
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 220 You will be disconnected after 15 minutes of inactivity.
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [TLS]
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 500 This security scheme is not implemented
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [auth] [SSL]
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 500 This security scheme is not implemented
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [user] [mannem]
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 331 User mannem OK. Password required
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
pureftpd    | ftp.info: Jul  7 04:39:09 pure-ftpd: ([email protected]) [INFO] mannem is now logged in
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 230 OK. Current directory is /home/ftpusers/mannem
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [opts] [UTF8 ON]
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 504 Unknown command
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [pwd] []
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 257 "/home/ftpusers/mannem" is your current location
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [type] [I]
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 200 TYPE is now 8-bit binary
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [pasv] []
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] 227 Entering Passive Mode (122,172,42,239,117,48)
pureftpd    | ftp.debug: Jul  7 04:39:09 pure-ftpd: ([email protected]) [DEBUG] Command [mlsd] []

Logs not working in latest

Behaviour

Logs aren't working in latest, which is 1.0.49.

Steps to reproduce this issue

  1. Start the latest container

Expected behaviour

Pure-FTPD logs should be output in the container logs.

Actual behaviour

Pure-FTPD logs are not in container logs

Configuration

  • Docker version (type docker --version) : Docker version 20.10.6, build 370c28948e
  • Docker compose version if applicable (type docker-compose --version) : docker-compose version 1.29.1, build c34c88b2
  • Platform (Debian 9, Ubuntu 18.04, ...) : Arch Linux
  • System info (type uname -a) : Linux industry 5.10.36-1-lts #1 SMP Tue, 11 May 2021 15:06:48 +0000 x86_64 GNU/Linux
  • Include all necessary configuration files : docker-compose.yml, .env

I'm running embedded in a mailcow deployment so I can't really show you my entire .env or compose file. Suffice to say everything works fine with 1.0.48.

Docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-tp-docker)

Server:
 Containers: 62
  Stopped: 1
 Images: 73
 Server Version: 20.10.6
 Storage Driver: zfs
  Zpool: zroot
  Zpool Health: ONLINE
  Parent Dataset: zroot/var/lib/docker
  Space Used By Parent: 24454594560
  Space Available: 97397714944
  Parent Quota: no
  Compression: off
 Logging Driver: journald
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 12dca9790f4cb6b18a6a7a027ce420145cb98ee7.m
 runc version: 2c7861bc5e1b3e756392236553ec14a78a09f8bf
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
  cgroupns
 Kernel Version: 5.10.36-1-lts
WARNING: No kernel memory limit support
WARNING: No oom kill disable support
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.763GiB
 Name: industry
 ID: Z3JZ:E2LR:V42G:L3XM:IN7Y:UN3N:M7KS:C2PL:TYAW:EBAB:IHLE:TCJN
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: true
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Logs

pureftpd_1           | [cont-finish.d] executing container finish scripts...                                                                                              
pureftpd_1           | [cont-finish.d] done.                                                                                                                              
pureftpd_1           | [s6-finish] waiting for services.                                                                                                                  
pureftpd_1           | pure-ftpd exited. code=                                                                                                                            
pureftpd_1           | s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening                                                              
pureftpd_1           | [s6-finish] sending all processes the TERM signal.                                                                                                 
pureftpd_1           | [s6-finish] sending all processes the KILL signal and exiting.                                                                                     
pureftpd_1           | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.                                                                      
pureftpd_1           | [s6-init] ensuring user provided files have correct perms...exited 0.                                                                              
pureftpd_1           | [fix-attrs.d] applying ownership & permissions fixes...       
pureftpd_1           | [fix-attrs.d] done.
pureftpd_1           | [cont-init.d] executing container initialization scripts...
pureftpd_1           | [cont-init.d] 01-config.sh: executing... 
pureftpd_1           | Setting timezone to UTC...
pureftpd_1           | Use MySQL authentication method
pureftpd_1           | Waiting 45s for MySQL database to be ready...
pureftpd_1           | MySQL database ready!
pureftpd_1           | Flags
pureftpd_1           |   Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswr
ite
pureftpd_1           |   Additional: --verboselog --verboselog --syslogfacility ftp --altlog clf:/data/pureftpd.log --tls 2 --chrooteveryone --createhomedir --minuid 1000
0 --noanonymous --nochmod
pureftpd_1           |   All: --verboselog --verboselog --syslogfacility ftp --altlog clf:/data/pureftpd.log --tls 2 --chrooteveryone --createhomedir --minuid 10000 --noa
nonymous --nochmod --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip MYIP --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login mysql:/data/puref
tpd-mysql.conf
pureftpd_1           | [cont-init.d] 01-config.sh: exited 0.
pureftpd_1           | [cont-init.d] 02-service.sh: executing... 
pureftpd_1           | [cont-init.d] 02-service.sh: exited 0.
pureftpd_1           | [cont-init.d] 03-uploadscript.sh: executing... 
pureftpd_1           | [cont-init.d] 03-uploadscript.sh: exited 0.
pureftpd_1           | [cont-init.d] ~-socklog: executing... 
pureftpd_1           | [cont-init.d] ~-socklog: exited 0.
pureftpd_1           | [cont-init.d] done.
pureftpd_1           | [services.d] starting services
pureftpd_1           | [services.d] done.

Compatibilitรฉ avec un Raspberry Pi 4 avec 4Go de Ram

Bonjour,

Comme expliquรฉ dans le titre, penses-tu que ton image est compatible avec le Raspberry Pi 4, รฉtant donnรฉ que c'est un ARMv8 ?

Car j'ai un problรจme pour le fonctionnement de cette image sur mon RPI4 que je ne peux pas expliquer en dรฉtail car je suis au travail.

J'utilise ton image sur un serveur AMD64, sans aucun problรจme et j'essaie รฉgalement de la faire fonctionner sur mon RPI4 avec trรจs exactement la mรชme configuration, mais sans aucun succรจs.

Libsodium Support is Broken

I was having trouble getting argon2 hashing to work with the image and discovered that Libsodium support isn't compiled-in, due to a typo in the Dockerfile.

Changing line 18 from libsodium to libsodium-dev fixes the problem.

Innumerable pure-uploadscript daemons are being created.

Hey!

I'm just wondering if any one of you have been using pure-uploadscript functionality and encountered the below problem:

image

At https://github.com/crazy-max/docker-pure-ftpd/blob/master/rootfs/etc/cont-init.d/03-uploadscript.sh pure-uploadscript demon is written to services.d and it is being called continuously.

cat > /etc/services.d/pure-uploadscript/run <<EOL
#!/usr/bin/execlineb -P
with-contenv
pure-uploadscript --daemon --run ${UPLOADSCRIPT}
EOL
chmod +x /etc/services.d/pure-uploadscript/run

Is it supposed to have only one daemon running here?

Thanks in advance.

Container should stop if pure-ftpd cannot start

Behaviour

Container runs idly if FTPD fails to start.

Steps to reproduce this issue

  1. Run anything to listen on port 2100: nc -l 2100 or crazymax/pure-ftpd.
  2. docker run -ti --rm --net host crazymax/pure-ftpd

Expected behaviour

Container should exit when pure-ftpd cannot bind to port.

Actual behaviour

Container logs "Address in use" and pure-ftpd exits, but supervisord and syslog continue running, effectively useless:

Setting timezone to UTC...
Use PureDB authentication method
Flags
  Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
  Additional:
  All: --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 205.234.47.168 --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login puredb:/data/pureftpd.pdb
2020-05-14 18:10:18,110 INFO Included extra file "/etc/supervisord/pure-ftpd.conf" during parsing
2020-05-14 18:10:18,110 INFO Included extra file "/etc/supervisord/syslog-ng.conf" during parsing
2020-05-14 18:10:18,110 INFO Set uid to user 0 succeeded
2020-05-14 18:10:18,112 INFO supervisord started with pid 1
2020-05-14 18:10:19,121 INFO spawned: 'pure-ftpd' with pid 14
2020-05-14 18:10:19,127 INFO spawned: 'syslog-ng' with pid 15
Unable to start a standalone server: Address in use
2020-05-14 18:10:19,134 INFO exited: pure-ftpd (exit status 0; not expected)
2020-05-14 18:10:20,141 INFO spawned: 'pure-ftpd' with pid 16
2020-05-14 18:10:20,142 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Unable to start a standalone server: Address in use
2020-05-14 18:10:20,146 INFO exited: pure-ftpd (exit status 0; not expected)
May 14 18:10:20 dsops pure-ftpd: (?@?) [ERROR] Unable to start a standalone server: [Address in use]
2020-05-14 18:10:22,157 INFO spawned: 'pure-ftpd' with pid 18
Unable to start a standalone server: Address in use
2020-05-14 18:10:22,165 INFO exited: pure-ftpd (exit status 0; not expected)
May 14 18:10:22 dsops pure-ftpd: (?@?) [ERROR] Unable to start a standalone server: [Address in use]
2020-05-14 18:10:25,180 INFO spawned: 'pure-ftpd' with pid 19
Unable to start a standalone server: Address in use
2020-05-14 18:10:25,197 INFO exited: pure-ftpd (exit status 0; not expected)
May 14 18:10:25 dsops pure-ftpd: (?@?) [ERROR] Unable to start a standalone server: [Address in use]
2020-05-14 18:10:25,198 INFO gave up: pure-ftpd entered FATAL state, too many start retries too quickly

Container remains running but is not performing its function.

Configuration

  • Docker version: 18.09.2, build 6247962
  • Platform: Ubuntu 18.04
  • System info: Linux dsops 4.18.0-25-generic #26-Ubuntu SMP Mon Jun 24 09:32:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Docker info

Containers: 14
 Running: 1
 Paused: 0
 Stopped: 13
Images: 337
Server Version: 18.09.2
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
runc version: 09c8266bf2fcf9519a651b04ae54c967b9ab86ec
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.18.0-25-generic
Operating System: Ubuntu 18.10
OSType: linux
Architecture: x86_64
CPUs: 6
Total Memory: 7.767GiB
Name: dsops
ID: XKP4:MQJX:7T3C:V75Z:PXSI:GVO6:SRCZ:6YL4:HJPQ:DPOO:DK4A:WGLF
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine

WARNING: No swap limit support

ChrootEveryone does not seem to work

Behaviour

When logging in I have full access to the system files. even though in /etc/pure-ftpd.conf ChrootEveryone is set to yes

i was trying stuff out, if i delete everything in /etc/pure-ftpd.conf the server still starts fine. is this file being used?

Steps to reproduce this issue

  1. download the example https://github.com/crazy-max/docker-pure-ftpd/tree/master/examples/mariadb
  2. create an account docker-compose exec db mysql -u pureftpd -p'asupersecretpassword' -e "INSERT INTO users (User,Password,Uid,Gid,Dir) VALUES ('foo',ENCRYPT('test'),'1003','1005','/home/foo');" pureftpd
  3. login in with a ftp client in my case winscp

Expected behaviour

well i should not be able to see the system files.

Actual behaviour

i can see everything and navigate and download.

Configuration

  • Docker version (type docker --version) : Docker version 20.10.24, build 297e128
  • Docker compose version if applicable (type docker-compose --version) : Docker Compose version v2.17.2
  • Platform (Debian 9, Ubuntu 18.04, ...) : Ubuntu WSL newest
  • System info (type uname -a) : docker windows
  • Include all necessary configuration files : docker-compose.yml, .env, i was able to reproduce this issue by just running the example. https://github.com/crazy-max/docker-pure-ftpd/tree/master/examples/mariadb

Docker info

Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.10.4)
compose: Docker Compose (Docker Inc., v2.17.2)
dev: Docker Dev Environments (Docker Inc., v0.1.0)
extension: Manages Docker extensions (Docker Inc., v0.2.19)
init: Creates Docker-related starter files for your project (Docker Inc., v0.1.0-beta.2)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.25.0)
scout: Command line tool for Docker Scout (Docker Inc., v0.9.0)

Server:
Containers: 4
Running: 4
Paused: 0
Stopped: 0
Images: 5
Server Version: 20.10.24
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 2456e983eb9e37e47538f59ea18f2043c9a73640
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
seccomp
Profile: default
cgroupns
Kernel Version: 5.15.90.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 32
Total Memory: 15.57GiB
Name: docker-desktop
ID: R23H:JWFG:UAWE:IGO5:KG2E:KKN5:F4UA:P677:OU4Y:SX47:BGKE:F2XV
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
hubproxy.docker.internal:5555
127.0.0.0/8
Live Restore Enabled: false

Logs

2023-04-08 17:03:18 [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
2023-04-08 17:03:18 [s6-init] ensuring user provided files have correct perms...exited 0.
2023-04-08 17:03:18 [fix-attrs.d] applying ownership & permissions fixes...
2023-04-08 17:03:18 [fix-attrs.d] done.
2023-04-08 17:03:18 [cont-init.d] executing container initialization scripts...
2023-04-08 17:03:18 [cont-init.d] 01-config.sh: executing...
2023-04-08 17:03:18 Setting timezone to Europe/Paris...
2023-04-08 17:03:18 Use MySQL authentication method
2023-04-08 17:03:18 Waiting 45s for MySQL database to be ready...
2023-04-08 17:03:32 MySQL database ready!
2023-04-08 17:03:32 Flags
2023-04-08 17:03:32 Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
2023-04-08 17:03:32 Additional:
2023-04-08 17:03:32 All: --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 83.83.84.207 --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login mysql:/data/pureftpd-mysql.conf
2023-04-08 17:03:32 [cont-init.d] 01-config.sh: exited 0.
2023-04-08 17:03:32 [cont-init.d] 02-service.sh: executing...
2023-04-08 17:03:32 [cont-init.d] 02-service.sh: exited 0.
2023-04-08 17:03:32 [cont-init.d] 03-uploadscript.sh: executing...
2023-04-08 17:03:33 [cont-init.d] 03-uploadscript.sh: exited 0.
2023-04-08 17:03:33 [cont-init.d] ~-socklog: executing...
2023-04-08 17:03:33 [cont-init.d] ~-socklog: exited 0.
2023-04-08 17:03:33 [cont-init.d] done.
2023-04-08 17:03:33 [services.d] starting services
2023-04-08 17:03:33 [services.d] done.
2023-04-08 17:03:37 ftp.info: Apr 8 15:03:37 pure-ftpd: ([email protected]) [INFO] New connection from 172.26.0.1
2023-04-08 17:03:43 ftp.warn: Apr 8 15:03:43 pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [banana]
2023-04-08 17:03:43 ftp.info: Apr 8 15:03:43 pure-ftpd: ([email protected]) [INFO] Logout.
2023-04-08 17:04:13 ftp.info: Apr 8 15:04:13 pure-ftpd: ([email protected]) [INFO] New connection from 172.26.0.1
2023-04-08 17:04:15 ftp.info: Apr 8 15:04:15 pure-ftpd: ([email protected]) [INFO] foo is now logged in``

Versioning question

Hi,

Thanks for the image. It's a only one image for ARM I found. I'm currently using SFTP, but I need to migrate to FTP quickly, so I'm interested in this image.

By the way I noticed you have RC versions tagged. Is this intentional that RC versions are replacing a stable tag? ๐Ÿ˜‰

eg. 1.0.49-RC14 -> docker.io/crazymax/pure-ftpd:1.0.49

In my opinion RC is like a testing version, and the fixed version tags like 1.0.49 should be immutable for stability.

Image for Raspberry Pi 4 Model B Rev 1.1

Behaviour

Error after connection

Error displaying directory contents '/'

Steps to reproduce this issue

  1. Open WinSCP
  2. Enter connection information
  3. Then the error appears once connected

Expected behaviour

Should log into user directory

Actual behaviour

I have the impression that it connects to the root directory "/"

Configuration

  • Docker version (type docker --version) : 19.03.5
  • Docker compose version if applicable (type docker-compose --version) : 1.25.0
  • Platform (Debian 9, Ubuntu 18.04, ...) : Raspbian 10 (buster)

docker-compose.yml

version: "3.7"

networks:
  backend:
    external: true

services:
  pureftpd:
    image: "crazymax/pure-ftpd"
    container_name: "pureftpd"
    restart: "unless-stopped"
    environment:
      - "TZ=Europe/Paris"
      - "AUTH_METHOD=puredb"
    ports:
      - "2100:2100"
      - "30000-30009:30000-30009"
    volumes:
      - "/home/toto/docker/pureftpd/data:/data"
      - "/home/toto/docker/pureftpd/toto:/home/toto"
    networks:
      - "backend"

Docker info

Client:
 Debug Mode: false

Server:
 Containers: 1
  Running: 1
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 19.03.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.19.75-v7l+
 Operating System: Raspbian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: armv7l
 CPUs: 4
 Total Memory: 3.826GiB
 Name: raspberry
 ID: RCFV:QF6X:OI6T:RBJ6:KHOV:OG62:PBSX:BEK4:INKY:MJBW:OMJC:VU3F
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support

Logs

Use PureDB authentication method
Flags
  Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
  Additional: -d -d
  All: -d -d --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 109.XXX.XXX.XXX --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login puredb:/data/pureftpd.pdb
2020-01-04 12:11:33,042 INFO Included extra file "/etc/supervisord/pure-ftpd.conf" during parsing
2020-01-04 12:11:33,043 INFO Included extra file "/etc/supervisord/syslog-ng.conf" during parsing
2020-01-04 12:11:33,043 INFO Set uid to user 0 succeeded
2020-01-04 12:11:33,051 INFO supervisord started with pid 1
2020-01-04 12:11:34,068 INFO spawned: 'pure-ftpd' with pid 13
2020-01-04 12:11:34,082 INFO spawned: 'syslog-ng' with pid 14
2020-01-04 12:11:35,088 INFO success: pure-ftpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-01-04 12:11:35,089 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] New connection from 192.168.1.122
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-You are user number 1 of 5 allowed.
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-Local time is now 12:14. Server port: 2100.
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-This is a private system - No anonymous login
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220 You will be disconnected after 15 minutes of inactivity.
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [user] [toto]
Jan  4 11:14:09 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 331 User toto OK. Password required
Jan  4 11:14:16 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] toto is now logged in
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 230 OK. Current directory is /
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [syst] []
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 215 UNIX Type: L8
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [feat] []
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 211-Extensions supported:
 UTF8
 EPRT
 IDLE
 MDTM
 SIZE
 MFMT
 REST STREAM
 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
 MLSD
 PRET
 AUTH TLS
 PBSZ
 PROT
 TVFS
 ESTA
 PASV
 EPSV
 SPSV
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 211 End.
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [opts] [UTF8 ON]
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 504 Unknown command
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pwd] []
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 257 "/" is your current location
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [type] [A]
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 200 TYPE is now ASCII
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pasv] []
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 227 Entering Passive Mode (109,XXX,XXX,XXX,117,57)
Jan  4 11:14:17 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [mlsd] []
2020-01-04 12:20:37,891 WARN received SIGTERM indicating exit request
2020-01-04 12:20:37,892 INFO waiting for pure-ftpd, syslog-ng to die
**
ERROR:lib/window-size-counter.c:76:window_size_counter_sub: assertion failed: (old_value >= value)
Bail out! ERROR:lib/window-size-counter.c:76:window_size_counter_sub: assertion failed: (old_value >= value)
2020-01-04 12:20:39,009 INFO stopped: syslog-ng (terminated by SIGABRT (core dumped))
2020-01-04 12:20:40,014 INFO stopped: pure-ftpd (exit status 0)
Use PureDB authentication method
Flags
  Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
  Additional: -d -d
  All: -d -d --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip 109.XXX.XXX.XXX --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login puredb:/data/pureftpd.pdb
2020-01-04 12:21:03,622 INFO Included extra file "/etc/supervisord/pure-ftpd.conf" during parsing
2020-01-04 12:21:03,623 INFO Included extra file "/etc/supervisord/syslog-ng.conf" during parsing
2020-01-04 12:21:03,623 INFO Set uid to user 0 succeeded
2020-01-04 12:21:03,637 INFO supervisord started with pid 1
2020-01-04 12:21:04,654 INFO spawned: 'pure-ftpd' with pid 13
2020-01-04 12:21:04,668 INFO spawned: 'syslog-ng' with pid 14
2020-01-04 12:21:05,673 INFO success: pure-ftpd entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2020-01-04 12:21:05,674 INFO success: syslog-ng entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] New connection from 192.168.1.122
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-You are user number 1 of 5 allowed.
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-Local time is now 20:25. Server port: 2100.
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-This is a private system - No anonymous login
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220 You will be disconnected after 15 minutes of inactivity.
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [user] [toto]
Jan  6 19:25:11 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 331 User toto OK. Password required
Jan  6 19:25:50 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
Jan  6 19:25:55 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 530 Login authentication failed
Jan  6 19:25:55 f812ef1dd8ea pure-ftpd: ([email protected]) [WARNING] Authentication failed for user [toto]
Jan  6 19:25:55 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] Logout.
Jan  6 19:25:55 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 530 Logout.
2020-01-06 20:25:56,548 INFO reaped unknown pid 17
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] New connection from 192.168.1.122
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-You are user number 1 of 5 allowed.
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-Local time is now 20:26. Server port: 2100.
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220-This is a private system - No anonymous login
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 220 You will be disconnected after 15 minutes of inactivity.
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [user] [toto]
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 331 User toto OK. Password required
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pass] [<*>]
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] toto is now logged in
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 230 OK. Current directory is /
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [syst] []
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 215 UNIX Type: L8
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [feat] []
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 211-Extensions supported:
 UTF8
 EPRT
 IDLE
 MDTM
 SIZE
 MFMT
 REST STREAM
 MLST type*;size*;sizd*;modify*;UNIX.mode*;UNIX.uid*;UNIX.gid*;unique*;
 MLSD
 PRET
 AUTH TLS
 PBSZ
 PROT
 TVFS
 ESTA
 PASV
 EPSV
 SPSV
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 211 End.
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [opts] [UTF8 ON]
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 504 Unknown command
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pwd] []
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 257 "/" is your current location
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [type] [A]
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 200 TYPE is now ASCII
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [pasv] []
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] 227 Entering Passive Mode (109,XXX,XXX,XXX,117,50)
Jan  6 19:26:04 f812ef1dd8ea pure-ftpd: ([email protected]) [DEBUG] Command [mlsd] []
Jan  6 19:41:04 f812ef1dd8ea pure-ftpd: ([email protected]) [INFO] Timeout
2020-01-06 20:41:05,594 INFO reaped unknown pid 20

FTP client hanging at Retrieving directory listing...

Hi,
I have connected using postgresql auth.
Connection is succesfull, but unable to retrieve directory listing

ftp-client log

Status:	Logged in
Status:	Retrieving directory listing...
Command:	PWD
Response:	257 "/home/ftpusers/ramana" is your current location
Command:	TYPE I
Response:	200 TYPE is now 8-bit binary
Command:	PASV
Response:	227 Entering Passive Mode (137,97,27,1,117,49)
Command:	MLSD
Error:	Connection timed out after 20 seconds of inactivity

pg.conf


PGSQLGetPW     SELECT password FROM users WHERE username='\L'

PGSQLGetDir    SELECT dir FROM users WHERE username='\L'

I have tried the following

  1. Added "-j" to data/pureftpd.flags to auto create directory when logged in
  2. Created directory "ramana" manually at /home/ftpusers

any pointers would be helpful

Environment variable UPLOADSCRIPT not work

Behaviour

When set environment variables UPLOADSCRIPT=/data/uploadscript.sh after file upload script not run

Steps to reproduce this issue

  1. set environment variables UPLOADSCRIPT=/data/uploadscript.sh
version: "3.2"

services:
  ftpd:
    image: ghcr.io/crazy-max/pure-ftpd:1.0.49
    container_name: ftpd
    ports:
      - "${IP_OUT}:2100:2100"
      - "${IP_OUT}:30000-30009:30000-30009"
    volumes:
     - "./data/home:/home"
     - "./ftpd-configuration/pureftpd.flags:/data/pureftpd.flags"
     - "./ftpd-configuration/pureftpd-mysql.conf:/data/pureftpd-mysql.conf"
     - "./ftpd-configuration/pureftpd-dhparams.pem:/data/pureftpd-dhparams.pem"
     - "./ftpd-configuration/pureftpd.pem:/data/pureftpd.pem"
     - "./ftpd-configuration/uploadscript.sh:/data/uploadscript.sh"
     - "/etc/localtime:/etc/localtime:ro"
     - "/etc/timezone:/etc/timezone:ro"
    environment:
     - "TZ=Europe/Kiev"
     - "AUTH_METHOD=mysql"
     - "PASSIVE_IP=${IP_OUT}"
     - "UPLOADSCRIPT=/data/uploadscript.sh"
    restart: always
    networks:
      - ftpd-net
      - mysql-net
      - rabbitmq-net
  1. uploadscript.sh content is:
#!/bin/sh
echo "$1 has been uploaded" >> /tmp/ftp.log

pureftpd.flags content is:

-d
-d
--tls 1
-O w3c:/var/log/pureftpd.log
  1. docker-compse up

Actual behaviour

  1. Starting log
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-config.sh: executing... 
Setting timezone to Europe/Kiev...
ln: /etc/localtime: File exists
/var/run/s6/etc/cont-init.d/01-config.sh: line 61: can't create /etc/timezone: Read-only file system
Use MySQL authentication method
Waiting 45s for MySQL database to be ready...
MySQL database ready!
Flags
  Secure: --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite
  Additional: -d -d --tls 1 -O w3c:/var/log/pureftpd.log
  All: -d -d --tls 1 -O w3c:/var/log/pureftpd.log --bind 0.0.0.0,2100 --ipv4only --passiveportrange 30000:30009 --noanonymous --createhomedir --nochmod --syslogfacility ftp --forcepassiveip xx.xx.xx.xx --maxclientsnumber 5 --maxclientsperip 5 --antiwarez --customerproof --dontresolve --norename --prohibitdotfilesread --prohibitdotfileswrite --login mysql:/data/pureftpd-mysql.conf --uploadscript
[cont-init.d] 01-config.sh: exited 0.
[cont-init.d] 02-service.sh: executing... 
[cont-init.d] 02-service.sh: exited 0.
[cont-init.d] 03-uploadscript.sh: executing... 
[cont-init.d] 03-uploadscript.sh: exited 0.
[cont-init.d] ~-socklog: executing... 
[cont-init.d] ~-socklog: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
  1. using FileZilla to longin and put a file
11:34:13	Status:	Connecting to xx.xx.xx.xx:2100...
11:34:13	Status:	Connection established, waiting for welcome message...
11:34:13	Status:	Initializing TLS...
11:34:14	Status:	Verifying certificate...
11:34:14	Status:	TLS connection established.
11:34:14	Status:	Logged in
11:34:14	Status:	Starting upload of /home/edv/Downloads/Telegram Desktop/rest_36971_20201224120001.zip
11:34:14	Status:	File transfer successful, transferred 277โ€ฏ012 bytes in 1 second
11:34:14	Status:	Retrieving directory listing of "/home/user-dir/test"...
11:34:15	Status:	Directory listing of "/home/user-dir/test" successful
  1. list of process on container.
/data # ps
PID   USER     TIME  COMMAND
    1 root      0:00 s6-svscan -t0 /var/run/s6/services
   35 root      0:00 s6-supervise s6-fdholderd
  600 root      0:00 s6-supervise socklog/log
  601 root      0:00 s6-supervise socklog
  602 root      0:00 s6-supervise pure-ftpd
  603 root      0:00 s6-supervise pure-uploadscript
  605 root      0:00 pure-ftpd (SERVER)
  606 nobody    0:00 s6-log -b - +^cron. T /var/log/socklog/cron - +^daemon. T /var/log/socklog/daemon
  607 nobody    0:00 socklog unix /dev/log
  608 root      0:00 pure-uploadscript -p /var/run/pure-uploadscript.pid -r /data/uploadscript.sh
  639 root      0:00 sh
  653 root      0:00 pure-uploadscript -p /var/run/pure-uploadscript.pid -r /data/uploadscript.sh
  655 root      0:00 pure-uploadscript -r /data/uploadscript.sh
  659 1003      0:00 pure-ftpd (IDLE)
  660 root      0:00 pure-ftpd (PRIV)
  664 root      0:00 sh
  671 root      0:00 sh
  677 root      0:00 ps
/data #
  1. /var/log/pureftpd.log
2021-04-05 08:35:43 xx.xx.xx.xx []created /home/user-dir/test/rest_36971_20201224120001.zip 226 test 277012
  1. But script not run
/data # cat /tmp/ftp.log
cat: can't open '/tmp/ftp.log': No such file or directory
  1. If run script manually, it's work
/data # sh uploadscript.sh test
/data # cat /tmp/ftp.log
test has been uploaded
/data # 

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.