vsftpd
Reinstall and configure the vsftpd FTP server with GoAdmio's settings (chrooted users, passive ports 30000–31000, per-user permissions, logging)
- Command:
/go/vsftpd - Category: FTP
- Required arguments: None
- Output: A progress bar and the package manager's output
- Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Output · Examples · Troubleshooting · Details · Security notes · See also
Overview
/go/vsftpd sets up the FTP service that GoAdmio accounts use. It:
- removes any existing
vsftpdandftppackages - installs both again
- adds GoAdmio's settings to the vsftpd configuration file
- creates the transfer log and the folder for per-user permissions
- enables vsftpd at boot and restarts it
[!WARNING]
- Existing
vsftpdandftppackages are removed first, together with your old configuration. Custom settings are lost.- The service is restarted, which drops active FTP sessions.
- The command does not open firewall ports and does not enable TLS. See Troubleshooting and Security notes.
Quick start
# Run as root
/go/vsftpd
Syntax
/go/vsftpd
The command takes no options. Anything you type after it is only written to the log. Run it as root.
Output
| Message | Meaning |
|---|---|
A progress bar labelled Installing VSFTPD |
The command started. |
| Package manager output | The ftp and vsftpd packages are being installed. Output from the removal step is hidden. |
Unknown operating system. |
The server's OS is not supported. Nothing was changed. |
There is no final success message. Check the service with systemctl status vsftpd.
Examples
# Install and configure
/go/vsftpd
# Check that the service is running
sudo systemctl status vsftpd
# Check that it is listening on port 21
sudo ss -tln | grep ':21 '
# Show the active settings (Debian and Ubuntu path)
sudo grep -vE '^\s*(#|$)' /etc/vsftpd.conf
# Show the transfer log
sudo tail /var/log/vsftpd.log
# Check that the needed firewall ports are open
/go/checkfirewall
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Unknown operating system. |
The OS is not AlmaLinux, Rocky, CentOS, Red Hat, Fedora, Debian, or Ubuntu. | Install and configure vsftpd by hand. |
Permission denied |
The settings are appended without sudo, and the Ubuntu steps do not use sudo at all. |
Run as root. |
| Cannot connect at all | The service is not running, or port 21 is blocked. | Check systemctl status vsftpd, then the firewall with checkfirewall. |
| Connects, but listing folders hangs or times out | Passive ports 30000–31000 are blocked, or the server is behind NAT (common on cloud servers). |
Open the range with allow and in the provider's firewall. Behind NAT, also set pasv_address to the public IP in the config. |
| My old vsftpd settings are gone | The old package and its configuration were removed first. | Re-apply them after the run. On RPM-based systems the old file may be saved next to the new one with a .rpmsave ending. |
| Users were disconnected | The service was restarted. | Run at a quiet time. |
| The log is empty | Only file transfers are logged, and only root can read the file. | Use sudo, then upload or download a file. |
log_ftp_protocol shows nothing |
It has no effect while the standard log format is on. | Turn off xferlog_std_format if you need protocol logging. |
| A user cannot upload or delete | A per-user file in /etc/vsftpd/permission limits them. |
See permission. |
Details
What it does
flowchart TD
A["/go/vsftpd"] --> B["Append the command to /var/log/go/vsftpd.log"]
B --> C{"OS supported?"}
C -- "No" --> D["Print error and exit"]
C -- "Yes" --> E["Remove vsftpd and ftp"]
E --> F["Install ftp and vsftpd"]
F --> G["Delete old chroot, write, and umask lines from the config"]
G --> H["Append GoAdmio's settings"]
H --> I["Create the log file and the permission folder"]
I --> J["Enable at boot and restart vsftpd"]
Steps in order
- Appends a timestamped line with the arguments to
/var/log/go/vsftpd.log. - Shows the progress bar
Installing VSFTPD. - Removes
ftpandvsftpd(on Debian and Ubuntu withpurge, which also deletes their configuration), then installs both. - Deletes every line containing
chroot_local_user,write_enable, orlocal_umaskfrom the configuration file, including commented ones. - Appends GoAdmio's settings at the end of the file (see below).
- Creates
/var/log/vsftpd.log, owned by root, readable and writable by root only (600). - Creates the folder
/etc/vsftpd/permissionfor per-user settings. - Enables vsftpd at boot and restarts it.
Configuration file location
| Operating system | File |
|---|---|
| AlmaLinux, Rocky, CentOS, Red Hat, Fedora | /etc/vsftpd/vsftpd.conf |
| Debian, Ubuntu | /etc/vsftpd.conf |
Settings added
| Setting | Value | Effect |
|---|---|---|
chroot_local_user |
YES |
Each user is locked inside their own home folder. |
allow_writeable_chroot |
YES |
Allows that, even though the home folder is writable. |
write_enable |
YES |
Uploads, deletes, and renames are allowed. |
local_umask |
022 |
New files are 644 and new folders are 755. |
user_config_dir |
/etc/vsftpd/permission |
Per-user settings files. A file's name must be the username. |
pasv_enable |
YES |
Passive mode is on. |
pasv_min_port, pasv_max_port |
30000, 31000 |
The range of passive data ports. |
max_per_ip |
0 |
No limit on connections per client IP. |
force_dot_files |
YES |
Hidden files, such as .htaccess, are shown. |
xferlog_enable |
YES |
The transfer log is on. |
xferlog_std_format |
YES |
Standard transfer-log format. |
xferlog_file |
/var/log/vsftpd.log |
The log file. An earlier line setting /var/log/xferlog is overridden by this later one. |
log_ftp_protocol |
YES |
Has no effect while xferlog_std_format is on. |
Everything not listed, such as who may log in and whether anonymous access is allowed, comes from the distribution's default vsftpd.conf.
Notes
- The settings are added at the end of the file. When a setting appears twice, vsftpd uses the later one.
- Per-user permissions are set with files in
/etc/vsftpd/permission. The script creates the folder only and leaves any files in it untouched. - The
ftpcommand-line client is installed with the server. - Passive mode needs the whole
30000–31000range open, which is 1,001 ports, in every firewall between the client and the server. - The command does not check that any step worked.
Security notes
| Item | Detail |
|---|---|
| No encryption | The script does not enable TLS. Plain FTP sends usernames, passwords, and files in clear text. Prefer SFTP (SSH), or add TLS to vsftpd. |
| No connection limit | max_per_ip=0 allows unlimited connections from one IP. Consider fail2ban against password guessing. |
| Writable chroot | allow_writeable_chroot=YES turns off a vsftpd safety check, so keep home folders under your control. |
| Log file | /var/log/vsftpd.log is readable by root only. |
See also
| Command | Description |
|---|---|
ftp |
Create or edit FTP accounts for a domain |
ftplog |
Report FTP activity for a domain |
permission |
Enable or disable FTP permissions for a domain |
allow |
Open a port in your server's firewall |
checkfirewall |
Verify that important required ports are open on your server |
fail2ban |
Install and configure Fail2ban to ban brute-force sources |
create |
Create a GoAdmio account from the command line |
skeleton |
Create or reset the skeleton FTP template account |