Skip to main content

An FTP server that forwards uploaded files to a WebDAV server

Project description

ftp2webdav

ftp2webdav is an FTP server that forwards all uploaded files to a WebDAV server. It was developed with the specific goal of retrofitting a Nextcloud interface into older devices or software that exclusively support FTP upload for file transfer.

Caution: ftp2webdav has not undergone security testing. Avoid exposing it to untrusted networks or the public internet without implementing proper security measures.

Quick Navigation

Features

  • FTP user authentication seamlessly validates against the WebDAV server
  • Lightweight and fast (uses pyftpdlib underneath)
  • Easy YAML configuration

Installation

Requires Python version 3.9 or higher and pip.

pip install ftp2webdav

Configuration

To configure ftp2webdav, a configuration file is required. By default, the program looks for it in ~/.ftp2webdav.conf or /etc/ftp2webdav. Create a sample configuration file with:

ftp2webdav --create-example-config

Example Configuration File

---
ftp:
  host: 127.0.0.1
  port: 21

webdav:
  host: webdav.host
  port: 443
  protocol: https
  path: uri/path/to/webdav/endpoint
  verify_ssl: True
  cert: /path/to/cert

target_dir: path/to/target/dir/
  • FTP server configuration (ftp):
    • host: Specifies the FTP server's IP address or hostname.
    • port: Specifies the FTP server's port.
  • WebDAV Server configuration (webdav):
    • host: Specifies the hostname or IP address of the WebDAV server.
    • port: Specifies the port of the WebDAV server.
    • protocol: Specifies the protocol used for WebDAV communication.
    • path: Defines the URI path to the WebDAV endpoint.
    • verify_ssl: Boolean indicating whether to verify SSL certificates.
    • cert: Path to the (local) SSL certificate used for secure communication.
  • Target Directory Configuration (target_dir):
    • Specifies the path to the target directory on the WebDAV server where uploaded files should be stored.

Usage

Run the server:

ftp2webdav

File Upload

Log into the server using valid user credentials of the WebDAV sever, and then upload a file. The uploaded file will be automatically stored in the directory specified in the config file.

Caveats

  • There are no subfolders on the FTP server, nor does it allow the creation of any. Thus, all files must be directly uploaded to the root directory.
  • Using interactive FTP browsers to access the server may result in errors, as they are restricted from reading the contents of the root directory.

License

ftp2webdav is distributed under the terms of the MIT License.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ftp2webdav-0.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

ftp2webdav-0.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file ftp2webdav-0.1.tar.gz.

File metadata

  • Download URL: ftp2webdav-0.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.5.0-4-amd64

File hashes

Hashes for ftp2webdav-0.1.tar.gz
Algorithm Hash digest
SHA256 283a12f4a7291c533bf4c71f8fe77de638715fa5635c1ceb62754e56db6f8e29
MD5 3d688956feeda77555ebabc7280eb604
BLAKE2b-256 ad8c0bb2cdc3fc8cc537e8427023386cbb02df16864a3dfacae3bc2019cb7620

See more details on using hashes here.

File details

Details for the file ftp2webdav-0.1-py3-none-any.whl.

File metadata

  • Download URL: ftp2webdav-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.11.6 Linux/6.5.0-4-amd64

File hashes

Hashes for ftp2webdav-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f34d45acfe8a7c9ffd5f32e9dc4277ea3cb35cc233149e5914cf39a995a639e4
MD5 f2158913c8dfe9bf1424ccaeb8a94a6d
BLAKE2b-256 8cce983099ce71c9736ab02e836ac0987d0a3265e9a61b7143bad41a00bf6313

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page