A full-featured FTP server for MVS 3.8j, built from the ground up with crent370. Supports native MVS datasets, JES2 job management, and UFS files via UFSD — with seamless switching between all three in a single session.
- Browse, upload, download, delete, rename datasets
- PDS member listing with ISPF statistics
- Binary roundtrip verified (MD5 match)
- Text transfers with full CP037 special character support (
[]{}|$@#) - Auto-allocation of new datasets via SITE parameters
- Catalog-based listing (no VTOC startup scan, instant startup)
- Wildcard filtering:
*.LOAD,**.DATA,R*(member filter)
- Job submission via internal reader
- Automatic USER/PASSWORD/NOTIFY injection into JOB card
- Job status query with z/OS-compatible listing format
- Spool retrieval (all DDs or specific spool file)
- Job purge
- Full Unix-style file and directory operations via UFSD
- Hybrid navigation: switch between MVS and UFS in one session
- Soft dependency: works without UFSD (MVS + JES still available)
- RAKF authentication (userid/password)
- FACILITY class
FTPAUTHfor FTP access control - Per-operation DATASET class authorization (READ/UPDATE/ALTER)
- ACEE switching: dataset I/O runs under logged-in user's identity
- STC runs as
FTPD/USERvia RACINIT (Principle of Least Privilege) - See doc/FTPD_RAKF_SETUP.md for setup instructions
- Verified identical behavior to z/OS 3.1 FTP server
- Tested with: FileZilla, ncftp, tnftp, curl, IBM PCOMM, Zowe CLI
- See doc/COMPAT.md for details
libc370 sysroot: d44cfea (2026-08-06) or later. That commit removed the
ASXB ENQ from racf_login()/racf_logout(); FTPD's ABEND recovery dropped the
defensive DEQ that used to release it after an ABEND, so building against an
older sysroot leaves an orphaned address-space-wide ENQ stalling every session's
login until that worker's next command. libc370 has no tags — the requirement is
a commit, not a version.
git clone https://github.com/mvslovers/ftpd.git
cd ftpd
# configure .env file with your MVS host settings
vi .env
make bootstrap build link# Copy STC procedure and config to MVS
copy samplib/ftpd to SYS2.PROCLIB
copy samplib/ftpdpm00 to SYS2.PARMLIB
- Add user
FTPDin groupUSERtoSYS1.SECURE.CNTL(USERS) - Add
FTPAUTHprofile toSYS1.SECURE.CNTL(PROFILES) - Recycle RAKF:
/S RAKF - See doc/FTPD_RAKF_SETUP.md for details
/S FTPD
ftp mvshost 2121| Command | Description |
|---|---|
| USER/PASS | Authentication via RAKF |
| SYST | System type (215 MVS) |
| FEAT | Feature negotiation |
| CWD/CDUP/PWD | Directory navigation (MVS prefix + UFS paths) |
| LIST/NLST | Directory listing (z/OS MVS format / Unix format) |
| RETR | Download dataset, PDS member, or UFS file |
| STOR | Upload (auto-allocates new datasets) |
| APPE | Append to dataset |
| DELE | Delete dataset, PDS member, or UFS file |
| MKD/RMD | Create/remove PDS or UFS directory |
| RNFR/RNTO | Rename dataset or UFS file |
| SIZE | File/dataset size query |
| MDTM | Modification timestamp (UFS) |
| TYPE A/I/E | ASCII, binary, EBCDIC transfer modes |
| PORT/PASV | Active and passive data connections |
| EPSV | Extended passive mode (RFC 2428) |
| SITE | Allocation parameters, JES mode, toggles |
| STAT/NOOP/HELP | Session info, keepalive, help |
| QUIT | Disconnect |
| Subcommand | Description |
|---|---|
| RECFM=fmt | Record format (FB, VB, F, V, U) |
| LRECL=n | Logical record length |
| BLKSIZE=n | Block size |
| PRIMARY=n | Primary space allocation |
| SECONDARY=n | Secondary space allocation |
| TRACKS / CYLINDERS | Space allocation unit |
| FILETYPE=JES / SEQ | Switch to JES or dataset mode |
| JESOWNER=name | JES job owner filter |
| JESJOBNAME=name | JES job name filter |
| JESSTATUS=status | JES job status filter (OUTPUT, ALL) |
| JESINTERFACELEVEL=n | JES interface level (1 or 2) |
| TRAILING | Toggle trailing blanks in text transfers |
Client ──► Control Connection (port 2121)
│
├── ftpd#cmd.c (command dispatcher)
├── ftpd#aut.c (RAKF authentication)
├── ftpd#mvs.c (MVS dataset operations)
├── ftpd#jes.c (JES2 interface)
├── ftpd#ufs.c (UFS operations via UFSD)
├── ftpd#lst.c (LIST formatting)
└── ftpd#sit.c (SITE command handling)
│
├── ftpd#dat.c (data connections PORT/PASV/EPSV)
└── ftpd#xlt.c (EBCDIC/ASCII translation)
| Dependency | Required | Purpose |
|---|---|---|
| crent370 | Yes | C runtime, RAKF, JES2, socket layer |
| RAKF | Yes | Authentication and authorization |
| UFSD | No | UFS filesystem access (soft dependency) |
| mbt | Build | Build tool |
See LICENSE.