Files
bbs/docs/wiki/Files-and-FTP.md
T
Claude 8e29dfd427 Documentation as wiki pages: docs/wiki, published to the GitHub wiki
The README's sections become pages (Building, Running, Administration,
Configuration, Modem callers, TN3270, Sixel graphics, Files and FTP, File
transfers, Doors, Newsgroups and NNTP, FidoNet, Security, Development)
with a Home page, sidebar and footer, kept in docs/wiki in the wiki's own
file layout.  Administration gains the whole command reference and
Configuration a map of every section.  docs/wiki/publish.sh copies them
to the wiki, and the Wiki workflow does it when they change on the
default branch.  The README keeps the introduction, a quick start and
links to the pages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AFQhReUqUc7F5srk2hViqr
2026-10-10 23:04:13 +00:00

2.3 KiB

File areas hold files; callers browse them from the BBS (F in the text menu, 8 on a 3270) and move them with an FTP client, logging in with their BBS name and password: each area is a directory.

; bbs.conf
[general]
files_dir = /var/lib/bbs/files
max_file_size = 64M
upload_quota = 256M        ; a user's uploads a day; sysops have none

[ftp]
address = :2121
passive_ports = 50000-50100
public_host = 203.0.113.7  ; behind NAT: the address passive replies give
tls = required             ; explicit FTPS: AUTH TLS before the login
cert_file = /etc/bbs/cert.pem
key_file = /etc/bbs/key.pem
advertise = bbs.example.org:2121
bbs filearea add Games "DOS games"
bbs filearea add Official "From the sysop" -sysop-upload
bbs file add Games ./doom.zip "Shareware Doom"
bbs file list Games

The FTP side is ftpserverlib with a file system of the BBS's own: / lists the areas, an area its files, and nothing of the server's disk is reachable. Files are stored under their record's number (files_dir/1, files_dir/2, ...), so no name a user gives becomes a path. Users may:

  • download anything (resuming too);
  • upload a new file into an area (not a sysop-only one), whose name is letters, digits and a few marks (no dots in front, no slashes, nothing a shell or Windows minds), up to max_file_size and what is left of upload_quota; an upload is written to a temporary file, hashed, and only then recorded and put in place;
  • delete their own files (sysops any).

Everything else (overwriting, appending, resuming uploads, renaming, directories, SITE, MFMT, CHMOD) is refused. Active mode is off (FTP bounce), data connections must come from the control connection's address, and the login is the BBS's, with its failure delay and its throttling by address. tls = required (the default) refuses USER before TLS, so no password crosses in the clear; implicit is TLS from the first byte; optional and no are there for old clients, and bbs check warns of them. anonymous = yes lets anonymous and ftp in to download only.

Open the FTP port and the passive range in the firewall. An FTP session is not a node: it does not show in who's online or count against max_nodes; [ftp] max_clients and max_per_ip limit it.

See also: File transfers, Security