Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.0.3] - 2026-11-11

### Fixed

- Logins failed with `500 OOPS: setgid` in some user namespaces (e.g. Podman with `UserNS=auto`), because 6.0.2
ran vsftpd's unprivileged process as `nobody` (uid and gid 65534), which they don't map. It now runs as a
dedicated `vsftpd` user with low ids, which still can't reach your files. That name is now reserved: the
container won't start if `BF_FTPS_VSFTPD_USER` is `vsftpd`.

## [6.0.2] - 2026-11-10

### Changed
Expand Down Expand Up @@ -39,6 +48,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Images are built and published by the shared `bfren/docker` build workflow (`build.yml`), replacing the separate
`dev.yml` and `publish.yml` workflows.

[6.0.3]: https://github.com/bfren/docker-ftps/compare/v6.0.2...v6.0.3
[6.0.2]: https://github.com/bfren/docker-ftps/compare/v6.0.1...v6.0.2
[6.0.1]: https://github.com/bfren/docker-ftps/compare/v6.0.0...v6.0.1
[6.0.0]: https://github.com/bfren/docker-ftps/compare/v5.2.5...v6.0.0
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ Images are published to Docker Hub (`bfren/ftps`) and Quay.io (`quay.io/bfren/ft
| `latest` | | You always want the newest image |
| `MAJOR` | `6` | You want updates, but not breaking changes |
| `MINOR` | `6.0` | You want fixes only - **recommended** |
| `VERSION` | `6.0.2` | You want to pin this image exactly |
| `VERSION` | `6.0.3` | You want to pin this image exactly |
| `vsftpdX`, `vsftpdX.Y` | `vsftpd3.0` | You want a vsftpd version |
| `vsftpdX.Y.Z` | `vsftpd3.0.5` | You want an exact vsftpd release |
| `vsftpdX.Y.Z-VERSION` | `vsftpd3.0.5-6.0.2` | You want to pin both |
| `vsftpdX.Y.Z-VERSION` | `vsftpd3.0.5-6.0.3` | You want to pin both |

## Configuration

Expand All @@ -87,7 +87,7 @@ Publish the whole passive range, with the same numbers on the host and in the co

| Variable | Values | Description | Default |
| ---------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------- |
| `BF_FTPS_VSFTPD_USER` | string | **Required.** The user name to log in with. | |
| `BF_FTPS_VSFTPD_USER` | string | **Required.** The user name to log in with (not `vsftpd`, which is reserved). | |
| `BF_FTPS_VSFTPD_PASS` | string | **Required.** The user's password. | |
| `BF_FTPS_EXTERNAL_URI` | host name | The address clients use - told to clients for passive connections. Takes priority over `BF_FTPS_EXTERNAL_IP`. | |
| `BF_FTPS_EXTERNAL_IP` | IP address | The address clients use, if you don't have a host name. One of the two is required. | |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.0.2
6.0.3
3 changes: 3 additions & 0 deletions overlay/etc/bf/templates/vsftpd.conf.esh
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ dirmessage_enable=YES
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# The unprivileged user vsftpd runs as before login - created by the image, it does not own /files.
nopriv_user=vsftpd
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
Expand Down
1 change: 1 addition & 0 deletions overlay/etc/nu/scripts/bf-ftps/checks.nu
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export def environment []: nothing -> list<string> {
[
[((bf env --safe FTPS_VSFTPD_USER) == "") "BF_FTPS_VSFTPD_USER must be set."]
[((bf env --safe FTPS_VSFTPD_PASS) == "") "BF_FTPS_VSFTPD_PASS must be set."]
[((bf env --safe FTPS_VSFTPD_USER) == "vsftpd") "BF_FTPS_VSFTPD_USER cannot be 'vsftpd' - that user name is reserved."]
[$no_address "You must provide either BF_FTPS_EXTERNAL_URI or BF_FTPS_EXTERNAL_IP."]
] | where {|x| $x.0 } | each {|x| $x.1 }
}
Expand Down
7 changes: 7 additions & 0 deletions overlay/etc/nu/scripts/tests/checks.nu
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ export def environment__reports_missing_user_and_password [] {
assert equal ["BF_FTPS_VSFTPD_USER must be set." "BF_FTPS_VSFTPD_PASS must be set."] $result
}

export def environment__rejects_reserved_user [] {
let result = with-env (valid | update BF_FTPS_VSFTPD_USER "vsftpd") { bf-ftps checks environment }

assert equal 1 ($result | length)
assert ($result.0 =~ "reserved")
}

export def environment__reports_missing_address [] {
let result = with-env (valid | reject BF_FTPS_EXTERNAL_IP) { bf-ftps checks environment }

Expand Down
7 changes: 7 additions & 0 deletions overlay/etc/nu/scripts/tests/conf.nu
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ export def vsftpd__keeps_users_in_files_directory [] {
assert ("local_root=/files" in $conf)
}

export def vsftpd__uses_own_unprivileged_user [] {
let conf = render vsftpd.conf

assert ("nopriv_user=vsftpd" in $conf)
assert not ("nopriv_user=fred" in $conf)
}

export def vsftpd__uses_ip_for_passive_mode [] {
let conf = render vsftpd.conf

Expand Down
9 changes: 9 additions & 0 deletions overlay/etc/nu/scripts/tests/image.nu
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@ export def install__ssl_directory_is_linked [] {
assert equal "/ssl" (^readlink /etc/ssl/private | str trim)
}

export def install__vsftpd_user_has_low_ids [] {
let user = open /etc/passwd | lines | split column ":" name x uid gid | where name == "vsftpd"

assert equal 1 ($user | length) "the vsftpd user should exist"
# user namespaces such as Podman's UserNS=auto may map only the first 1024 ids
assert (($user.0.uid | into int) < 1000) "the vsftpd uid should be below 1000"
assert (($user.0.gid | into int) < 1000) "the vsftpd gid should be below 1000"
}


#======================================================================================================================
# scripts
Expand Down
6 changes: 6 additions & 0 deletions overlay/tmp/install
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ def main [] {
bf write "Installing additional packages."
bf pkg install [lftp openssl]

# vsftpd's unprivileged process runs as this user - it must not own /files, and its uid and gid must be low,
# because some user namespaces (e.g. Podman's UserNS=auto) don't map 'nobody' (65534)
bf write "Adding vsftpd user."
{ ^addgroup -S vsftpd } | bf handle
{ ^adduser -S -D -H -h /var/empty -s /sbin/nologin -G vsftpd vsftpd } | bf handle

# add bf-ftps module to config
bf config use_mod bf-ftps

Expand Down
Loading