Disclaimer: This project was generated by Claude Code, an AI-powered coding assistant by Anthropic. Model used: Claude Opus 4.5 (claude-opus-4-5-20251101).
A Django-based web application for managing ProFTPD users and folder access permissions. Designed for use with OpenMediaVault servers with ZFS storage.
- User Management: Create, edit, and delete FTP users with password hashing
- Folder Management: Define folders with paths and descriptions
- Access Control: Assign read-only or read/write permissions per user per folder
- Config Generation: Automatically generates
proftpd.confandftpd.passwdfiles - Web Interface: Clean Bootstrap 5 UI with dashboard overview
- Python 3.8+
- Django 4.2+
cd d:\work\proftpdcontrol
pip install -r requirements.txt
python manage.py migrate
python manage.py runserverOpen http://127.0.0.1:8000 in your browser.
- Add Folders: Navigate to Folders → Add Folder. Enter your ZFS paths (e.g.,
/pool/documents) - Create Users: Navigate to Users → Add User. Set username and password
- Assign Permissions: Click the key icon next to a user to manage folder access
- Generate Config: Go to "Generate Config" to preview and download configuration files
- Deploy: Copy
proftpd.confandftpd.passwdto your server and restart ProFTPD
| Field | Type | Description |
|---|---|---|
username |
CharField(100) | Unique username for FTP login |
password_hash |
CharField(255) | MD5 password hash for ProFTPD |
is_active |
BooleanField | Whether the user can log in |
created_at |
DateTimeField | Auto-set on creation |
updated_at |
DateTimeField | Auto-updated on save |
| Field | Type | Description |
|---|---|---|
name |
CharField(200) | Display name for the folder |
path |
CharField(500) | Full filesystem path (unique) |
description |
TextField | Optional description |
created_at |
DateTimeField | Auto-set on creation |
| Field | Type | Description |
|---|---|---|
user |
ForeignKey(FTPUser) | The FTP user |
folder |
ForeignKey(Folder) | The folder being accessed |
permission |
CharField(10) | Either read or write |
created_at |
DateTimeField | Auto-set on creation |
Constraint: unique_together = ['user', 'folder']
proftpdcontrol/
├── manage.py # Django management script
├── requirements.txt # Python dependencies
├── db.sqlite3 # SQLite database
├── README.md # This file
│
├── proftpdcontrol/ # Django project configuration
│ ├── __init__.py
│ ├── settings.py # Django settings
│ ├── urls.py # Root URL configuration
│ ├── asgi.py # ASGI config
│ └── wsgi.py # WSGI config
│
└── ftpmanager/ # Main application
├── __init__.py
├── admin.py # Django admin (unused)
├── apps.py # App configuration
├── models.py # Database models (FTPUser, Folder, FolderAccess)
├── views.py # View functions (CRUD + config generation)
├── forms.py # Django forms for user input
├── urls.py # App URL routing
├── config_generator.py # ProFTPD config file generator
├── tests.py # Tests (placeholder)
│
├── migrations/ # Database migrations
│ ├── __init__.py
│ └── 0001_initial.py # Initial migration
│
├── templates/ftpmanager/ # HTML templates
│ ├── base.html # Base template with sidebar
│ ├── dashboard.html # Dashboard overview
│ ├── user_list.html # List all users
│ ├── user_form.html # Create/edit user form
│ ├── user_confirm_delete.html
│ ├── user_access.html # Manage user's folder permissions
│ ├── folder_list.html # List all folders
│ ├── folder_form.html # Create/edit folder form
│ ├── folder_confirm_delete.html
│ └── generate_config.html # Config preview and download
│
└── templatetags/ # Custom template tags
├── __init__.py
└── ftpmanager_tags.py # Dictionary lookup filter
Contains:
- Server settings (port 21, standalone mode)
- Virtual user authentication via
ftpd.passwd - Directory-level access rules based on user permissions
- Logging configuration
Format: username:password_hash:uid:gid:gecos:homedir:shell
Contains all active FTP users with their hashed passwords.
cd /opt/proftpdcontrol
source venv/bin/activate
# Preview changes
python manage.py deploy_config --dry-run
# Deploy and restart ProFTPD
sudo python manage.py deploy_config --test --restartOptions:
--config-dir- ProFTPD config directory (default:/etc/proftpd)--config-file- Config file path (default:conf.d/users.conf)--passwd-file- Password file path (default:ftpd.passwd)--test- Test configuration after deploy--restart- Restart ProFTPD after deploy--dry-run- Preview without making changes
- Download both config files from the web interface
- Copy to your server:
scp proftpd.conf root@server:/etc/proftpd/conf.d/users.conf scp ftpd.passwd root@server:/etc/proftpd/ftpd.passwd
- Set permissions:
chmod 600 /etc/proftpd/ftpd.passwd chown root:root /etc/proftpd/ftpd.passwd
- Test and restart:
proftpd -t systemctl restart proftpd
This project is provided as-is for personal use.