Usage ‐ Transfer ‐ FTP Config - Team4388/ScoutingApp2025 GitHub Wiki

Usage - Transfer - FTP Config

For our FTP server, we use the service vsftpd under linux. And to simplify setup, it uses an anonymous connection.

Installation

sudo apt install vsftpd
sudo systemctl vsftpd enable
sudo systemctl vsftpd start

Configuration

vsftpd requires it's root directory have permissions set to 577 and a subdirectory set to 777. For the app, this subdirectory must be named "RidgeScout"

sudo mkdir /ftp/
sudo chmod 577 /ftp/
cd /ftp
sudo mkdir RidgeScout
sudo chmod 777 RidgeScout

This is the configuration of /etc/vsftpd.conf that we use:

## Refrence: https://www.linuxscrew.com/vsftpd-anonymous-ftp-server
# Default Options

# Run vsftpd in the background
#background=YES
# Listen for incoming connections
listen=YES
# Allow writing files
write_enable=YES
# File creation mask for local users - not used, but part of the default config, so I've left it in
local_umask=022
# Do not check for a valid user shell
check_shell=NO
# Do not maintain session logins
session_support=NO

#connect_from_port_20=YES
#listen_port=21

# Anonymous FTP server specific stuff
#
# Enable anonymous logins
anonymous_enable=YES
# Disable local user logins - they won't be used
local_enable=NO
# Set the root path for the FTP server files
# This must NOT be publicly writable - ensure it's set with chmod permissions 775 at least
anon_root=/ftp/
# Allow anonymous users to create directories
anon_mkdir_write_enable=YES
# Allow anoynmous users to upload files
anon_upload_enable=YES
# Allow anonymous users to rename and delete files
anon_other_write_enable=YES
# Do not ask for password for anonymous user
no_anon_password=YES
# Hide user/group info in directory listings
hide_ids=YES
# The name of the anonymous FTP user - this  fixes the 'cannot change directory' error
ftp_username=ftp
# Make newly uploaded files read/writable
anon_umask=000

# Min anon port bound
pasv_min_port=40000
# Max anon port bound
pasv_max_port=50000
  • You must forward the following ports:
tcp/20 - FTP Control port
tcp/21 - FTP Data port
tcp/40000-50000 - FTP Anon ports