Setting up an FTP server with vsftpd on Fedora
Setting up file transfer services on Fedora remains a common task for administrators across Australian data centres, from small business racks in Brisbane to cloud regions in Sydney. The vsftpd daemon — short for Very Secure FTP Daemon — is favoured for its lightweight footprint, solid security defaults, and straightforward configuration. This guide covers the practical steps to get a working FTP service running on Fedora.
Fedora users in Melbourne and Perth often run vsftpd behind NAT or inside private subnets, which introduces extra considerations around passive mode ports and firewall rules. Before starting, update the system with sudo dnf update and confirm root or sudo access. Decide which users need FTP access, since vsftpd supports anonymous mode for mirrors or authenticated mode for internal teams.
Installing vsftpd on Fedora
The package ships in the standard Fedora repositories. Run sudo dnf install vsftpd -y and confirm the version with vsftpd -v. Enable the service at boot with sudo systemctl enable vsftpd, then start it with sudo systemctl start vsftpd. Check sudo systemctl status vsftpd to confirm an active state without failed dependencies.
Fedora's SELinux stack interacts with FTP in subtle ways. Anonymous uploads require the ftpd_anon_write boolean by default. For internal use, leave SELinux in enforcing mode and switch on ftpd_full_access using sudo setsebool -P ftpd_full_access on so vsftpd can read user home directories without weakening the broader policy.
Configuring the core vsftpd settings
The main configuration file lives at /etc/vsftpd/vsftpd.conf. Back it up first with sudo cp /etc/vsftpd/vsftpd.conf /etc/vsftpd/vsftpd.conf.bak, then open it with nano or vim to review the directives that matter for a typical deployment.
Key directives to configure:
anonymous_enable=NOto disable anonymous logins unless neededlocal_enable=YESso system users can authenticatewrite_enable=YESif uploads are requiredchroot_local_user=YESto lock users inside their home directory
Restart the daemon after every change with sudo systemctl restart vsftpd and watch the journal using sudo journalctl -u vsftpd -f. Misplaced whitespace is the most common reason vsftpd refuses to start cleanly on Fedora.
Managing local users and permissions
Create dedicated FTP users rather than handing out shell accounts. The command sudo useradd -m -s /sbin/nologin ftpuser adds a user without an interactive login shell, which is the safer default. Set a password with sudo passwd ftpuser and confirm the home directory exists at /home/ftpuser.
For sites in Adelaide or Hobart where multiple administrators share the same endpoint, place users in a common group and apply consistent chmod permissions. If write access is required, set allow_writeable_chroot=YES in vsftpd.conf — a frequent oversight that locks users out of their own directories. After user changes, restart vsftpd so PAM and the user database are re-read.
Opening the firewall for FTP
Fedora ships with firewalld, which does not automatically open a hole for FTP traffic. Add the service permanently with sudo firewall-cmd --permanent --add-service=ftp and reload with sudo firewall-cmd --reload. For passive mode, open a port range such as 40000–50000 in both the firewall and the pasv_min_port and pasv_max_port directives.
Australian ISPs such as Telstra and Optus sometimes apply CGNAT, which breaks passive FTP because the server sees the router's address rather than the client's. If users are behind CGNAT, encourage active mode or switch to SFTP. Before blaming the firewall, run dig for DNS checks from the server to confirm the hostname resolves to your public IP.
Enabling TLS for encrypted transfers
Plain FTP sends credentials in the clear, which is unacceptable on corporate LANs in Canberra and Darwin. Generate a self-signed certificate with sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/vsftpd/vsftpd.key -out /etc/vsftpd/vsftpd.crt and point the configuration at both files using rsa_cert_file and rsa_private_key_file. Set ssl_enable=YES and force_local_data_ssl=YES to require encryption for logins and data channels.
Once TLS is enabled, clients need ftps:// or the explicit TLS option in FileZilla and similar tools. Reject plain logins by leaving implicit_ssl off and keeping allow_anon_ssl and ssl_tlsv1 at secure defaults. Test the handshake with openssl s_client -connect your.server:21 -starttls ftp to confirm the certificate chain is valid.
Hardening and ongoing maintenance
A working FTP server still needs regular care, particularly around log analysis. Fedora routes vsftpd logs into /var/log/vsftpd.log through rsyslog. A quick way to spot brute-force attempts is grep "FAIL LOGIN" /var/log/vsftpd.log | awk '{print $12}' | sort | uniq -c | sort -rn, which leans on shell text processing similar to awk text processing techniques.
Essential hardening checklist:
- Disable anonymous access unless you run a public mirror
- Require TLS for all logins and data transfers
- Lock users into their home directories with chroot
- Restrict passive mode to a narrow port range
FTP is unencrypted at its core and many Australian organisations now prefer SFTP over OpenSSH for file transfers. If your use case allows it, drop FTP entirely and run an internal SFTP server instead.
The same maintenance principles apply to any internet-facing service, including video slot platforms that require their own uptime and security diligence. A vsftpd install on Fedora is rarely the end of the story — it is the start of an ongoing cycle of patching, monitoring, and policy refinement. Keep configuration under version control, document every change, and revisit firewall rules whenever passive mode ports shift. Careful configuration, disciplined log review, and TLS encryption are what separate a brittle FTP deployment from one that quietly serves an Australian team for years.