Troubleshooting¶
The logs¶
Set MAXIMUM_LOG_FILES to a value above 0 and look at LOG_FOLDER (uftpLog_YYYY-MM-DD). Each line says which client and which command, and why a connection was closed.
For a problem you can reproduce, set DAEMON_MODE = false and start the server from a terminal.
The server does not start, or an option has no effect¶
At start the server says on standard error which option is not valid (LOGIN_TIMEOUT must be a whole number). An option that has no effect is often a name written wrong: with the log on, the lines
Configuration: ... is not an option name the options that were ignored or repeated, and the files that others can read or change.
I cannot connect¶
- Is the server running?
sudo ss -ltnp | grep uFTPshould show the port. - Is the port open in the firewall and forwarded by the router? See Behind a NAT or a firewall.
421: the server is full (MAXIMUM_ALLOWED_FTP_CONNECTION), or your address reachedMAX_CONNECTION_NUMBER_PER_IPorMAX_CONNECTION_RATE_PER_IP.421 Too many logins in progress: 32 PAM checks are running, try again. FileZilla with 10 simultaneous transfers uses 11 sessions.530at the login: wrong user or password. AfterMAX_CONNECTION_TRY_PER_IPfailed logins the address is blocked for 5 minutes (and byfail2banfor longer, if you use it: Block attacks with fail2ban).- The connection closes by itself:
LOGIN_TIMEOUT(default 60 s to log in) orIDLE_MAX_TIMEOUT.
The login works but the listing or a transfer hangs¶
The data connection cannot be established. Check the passive ports (RANDOM_PORT_START to RANDOM_PORT_END): they must be open in the firewall and forwarded by the
router. Behind a NAT with TLS set SERVER_IP. The log shows 425.
TLS and certificates¶
- The client does not offer TLS: if
FORCE_TLS = true, clients without TLS are refused. Enable explicit FTP over TLS in the client. - "Certificate not trusted": normal for a self-signed certificate. Trust it in the client, or use a certificate from an authority (see TLS and certificates).
unable to verify the first certificate: the file inCERTIFICATE_PATHhas to contain your certificate first and then the intermediate ones.- The server does not start with TLS: the log says
invalid certificateorinvalid private key. The key must match the certificate. A key protected by a password needsTLS_KEY_PASSWORD_FILE. - A build without OpenSSL answers
502toAUTH TLS. Rebuild with OpenSSL.
Errors with many parallel transfers¶
Clients such as FileZilla upload a tree of directories with many connections. Until one of them has created a directory, the others get 550 (change of directory) and 450 Parent
directory does not exist, try again later. They are normal: the client retries and the files arrive. If it is too noisy, reduce the number of simultaneous transfers in the client
(2 is the default of FileZilla).
A file is not complete after an upload¶
The log has a line STOR ... failed after N bytes with the reason. 452 means the disk is under MIN_FREE_SPACE_MB.
A user is refused with "Permission denied: this account can not ..."¶
The account has PERMISSIONS_n (or READ_ONLY_n) that does not include that action. The log says which one (... refused: the account has no permission to ...). See Permissions. SITE RUN needs run, which all does not include: write all,run.
Deleting or renaming is refused with 550¶
With USER_NAME_OWNER_n and GROUP_NAME_OWNER_n the user must be able to write the file and the directory that holds it (since 4.4.0), like on the system. Give the directory to that owner, or the write bit to its group. See Permissions.
A login through the authentication hook fails¶
The user gets the same 530 for a wrong password and for a hook that did not answer; the log tells them apart: the authentication hook is not available for user ... (with the first line the hook wrote on standard error) means the program failed or took longer than AUTH_HOOK_TIMEOUT_SECONDS. Run it by hand with the name and the password on two lines. See Authentication hook.
The log is empty and the server prints nothing¶
With MAXIMUM_LOG_FILES = 0 the server is silent on purpose: no file and nothing on standard output or standard error, except a [FATAL] line or a crash report when it stops. Set it above 0 (or LOG_TO_STDERR = true, or SYSLOG_ENABLED = true) to see what happens.
The clients get "421 Service not available, the server is stopping"¶
uFTP received SIGTERM or SIGINT and is waiting for the transfers in progress to end (SHUTDOWN_GRACE_SECONDS). New connections are refused until it is started again. See Stopping the server.
docker stop takes several seconds¶
A big range of published passive ports slows docker stop (Docker removes each port; uFTP itself exits right after the last transfer). Publish 10 to 20 ports. See Docker.
The server stopped¶
With RESPAWN_PROCESS = true a supervisor restarts it; the log says why it stopped and shows the stack trace of a crash. Please
report it if it is a crash that you can reproduce.
Report a problem¶
Open an issue on GitHub with the version, how it was built, the relevant lines of the log and the configuration without passwords. For a security problem do not open a public issue: see Security.