Community Solution

ZimaOS FTP Server for Cameras: SFTP or vsftpd?

A user needed FTP uploads from a surveillance camera; community members suggested SFTP and a vsftpd container, but the FTP attempt still had directory-listing and camera connection problems.

For a surveillance camera that needs to upload files to ZimaOS, use SFTP if the camera supports it. ZimaOS can enable SSH from Developer Mode, giving you an encrypted SFTP path without installing a separate FTP server.

If the camera supports only classic FTP, a container such as vsftpd can work, but the forum YAML exposed only ports 20 and 21. That can be incomplete for passive FTP, and the reported “cannot read directory” symptom also makes host-folder permissions worth checking.

Use SFTP First When the Camera Supports It

The current ZimaOS SSH setup guide shows how to enable SSH from the ZimaOS interface. An SFTP-capable client normally connects to the ZimaOS address over SSH, commonly on port 22, using an account with permission to the destination path.

SFTP and FTP are different protocols. A camera that explicitly offers only FTP cannot use SFTP merely by changing the port.

If You Need FTP, Configure Passive Ports Too

The container used in the thread was fauria/vsftpd. Its vsftpd container documentation documents passive mode variables such as PASV_MIN_PORT and PASV_MAX_PORT and notes that the corresponding port range must also be published.

For LAN cameras, keep the FTP service limited to the trusted local network. Plain FTP does not encrypt credentials or file transfers, so it should not be exposed directly to the public internet.

Check the Bound Upload Folder

The forum example mapped a ZimaOS host directory into /home/vsftpd. Docker bind mounts use the host filesystem directly, so the container process still needs compatible ownership and permissions on that directory.

If login succeeds but listing or upload fails, confirm the host path exists, the container sees it, and the FTP user can write there. Test with a temporary folder before pointing the camera at an important archive.

A Practical Test Order

  • Confirm whether the camera supports SFTP or only FTP.
  • Test the same credentials from a desktop client on the LAN.
  • Verify directory listing before testing uploads.
  • For FTP passive mode, publish the configured passive port range.
  • Only after the desktop test works, copy the same host, port, user and path into the camera.

The device connection guide provides additional context for choosing a connection method that fits your local network.