System Serviceswebdavserverwsgipythonfile-sharing

wsgidav

wsgidav is a generic and extendable WebDAV server written in Python and based on WSGI. It allows sharing filesystem folders over WebDAV protocol with configurable authentication and server options.

Description

wsgidav provides a flexible WebDAV server implementation for sharing filesystem folders. Available as Python 3 library (python3-wsgidav) and documentation package (python-wsgidav-doc), it supports multiple WSGI servers and authentication methods. The tool is useful for quickly setting up WebDAV shares for testing, development, or penetration testing scenarios requiring remote file access.

Key features include anonymous access, NT or PAM-login authentication, and support for various WSGI servers like cheroot, gevent, and uvicorn. Configuration can be done via command-line flags or YAML files, with a default search for 'wsgidav.yaml' in the current directory. This makes it suitable for rapid deployment in cybersecurity contexts, such as client-side attacks involving code execution via Windows library files as referenced in PEN-200 training.

The server publishes specified filesystem paths as WebDAV shares, enabling read-write access over HTTP. Licensed under MIT, it is maintained on GitHub with extensive configuration documentation.

How It Works

wsgidav operates as a WSGI-based WebDAV server, using pre-installed WSGI servers like cheroot (default) to handle HTTP requests and implement WebDAV protocol (RFC 4918). It mounts a filesystem folder at the root path, exposing it for RW operations. Authentication modes (anonymous, NT, PAM-login) control access, while SSL adapters (builtin, pyopenssl) enable secure connections. Configuration files in YAML format override CLI flags for advanced setups including multi-share definitions and custom providers.

Installation

bash
sudo apt install python3-wsgidav

Flags

-h, --helpshow this help message and exit
-p, --port PORTport to serve on (default: 8080)
-H, --host HOSThost to serve from (default: localhost). 'localhost' is only accessible from the local computer. Use 0.0.0.0 to make your application public
-r, --root ROOT_PATHpath to a file system folder to publish for RW as share '/'.
--auth {anonymous,nt,pam-login}quick configuration of a domain controller when no config file is used
--server {cheroot,ext-wsgiutils,gevent,gunicorn,paste,uvicorn,wsgiref}type of pre-installed WSGI server to use (default: cheroot).
--ssl-adapter {builtin,pyopenssl}SSL adapter to use
-v | -qverbose or quiet mode
-c CONFIG_FILE | --no-configuse specific config file or no config
--browseenable browse mode
-Vshow version

Examples

Share filesystem folder '/temp' for anonymous access (no config file used)
wsgidav --port=80 --host=0.0.0.0 --root=/temp --auth=anonymous
Run using a specific configuration file
wsgidav --port=80 --host=0.0.0.0 --config=~/my_wsgidav.yaml
Run on default host localhost and default root with custom port (8080)
wsgidav -p 8080
Run publicly accessible server on all interfaces with defaults
wsgidav -H 0.0.0.0
Share /shared folder with NT authentication
wsgidav --root=/shared --auth=nt
Use gevent WSGI server with builtin SSL adapter
wsgidav --server=gevent --ssl-adapter=builtin
Use wsgidav.yaml config file from current directory
wsgidav -c wsgidav.yaml
Updated 2026-04-16kali.org ↗