Quick Start Guide

This guide walks you through the essential steps to get your CompleteFTP for Linux server up and running quickly. You'll create a user, set up a folder, and test connections using multiple protocols.

Prerequisites

  • CompleteFTP installed and running (see Installation and Setup)
  • Your user added to the completeftp group
  • Basic familiarity with Linux command line

Overview

This quick start will take you through:

  1. Creating your first user with password authentication
  2. Setting up a folder for file storage
  3. Testing connections via FTP, SFTP, and HTTPS
  4. Verifying file transfers work correctly
  5. Understanding security and next steps

Time required: 15-30 minutes

Step 1: Create Your First User

Let's create a user account for testing:

# Create a new user
completeftp user add myuser

# Set a password for the user (interactive prompt)
completeftp user set myuser password

When prompted, enter a secure password (e.g., MySecurePass123!).

Note: The password must meet the default policy requirements:

  • At least 8 characters
  • Mixed case letters
  • At least one digit
  • Special characters recommended

Verify the User

# Check that the user was created
completeftp user list

# View user details
completeftp user show myuser

You should see myuser in the user list with basic configuration applied.

Step 2: Set Up a Folder Structure

When you create a user, CompleteFTP automatically creates a virtual folder at /Home/myuser, but it doesn't have a physical directory behind it yet. Let's map it to a real directory on disk:

# Create a physical directory and make it owned by the completeftp service user
sudo mkdir -p /var/ftp/myuser
sudo chown completeftp:completeftp /var/ftp/myuser

# Map the existing virtual folder to the physical directory
completeftp folder set /Home/myuser mapping.path=/var/ftp/myuser

# Set folder ownership to the user
completeftp folder chown /Home/myuser owner myuser

# Set appropriate permissions
completeftp folder chmod /Home/myuser owner rwxd

Note: Physical directories must be owned by the completeftp system user (or be world-writable), since the CompleteFTP service runs as that user.

Create a Shared Folder

# Create a shared directory owned by the service user
sudo mkdir -p /var/ftp/shared
sudo chown completeftp:completeftp /var/ftp/shared

# Add to CompleteFTP
completeftp folder add /Shared OS --mapping=/var/ftp/shared

# Set permissions for all users
completeftp folder chmod /Shared all rw

Verify Folder Setup

# List folders
completeftp folder list

# Check folder details
completeftp folder show /Home/myuser
completeftp folder show /Shared

Step 3: Check for Port Conflicts

CompleteFTP's SFTP server listens on port 22 by default. If OpenSSH is already running on that port, CompleteFTP won't be able to bind to it. Check with:

sudo ss -tlnp | grep :22

If OpenSSH is using port 22, you have two options:

  • Stop OpenSSH if you don't need it: sudo systemctl stop sshd && sudo systemctl disable sshd
  • Move CompleteFTP's SFTP to another port if you need to keep OpenSSH:
    completeftp site set default portSFTP=2222

    If you do this, add -P 2222 to the sftp commands in the examples below.

Step 4: Test Connections

Now let's test that connections work with different protocols:

Test FTP Connection

# Using command-line FTP client
ftp localhost

When prompted:

  • Username: myuser
  • Password: MySecurePass123! (or whatever you set)

Try basic FTP commands:

# List files
ls

# Change to home directory
cd /Home/myuser

# Create a test file
!echo "Hello from FTP" > /tmp/test.txt

# Upload the file
put /tmp/test.txt

# List files to verify upload
ls

# Download the file
get test.txt /tmp/downloaded.txt

# Quit FTP
quit

Test SFTP Connection

# Connect to CompleteFTP's SFTP on port 2222
sftp myuser@localhost

Enter your password when prompted.

Try SFTP commands:

# List files
ls

# Change to home directory
cd /Home/myuser

# Upload a file
put /etc/hostname

# Download a file
get test.txt /tmp/sftp-downloaded.txt

# Quit SFTP
quit

Test HTTPS/Web Interface

Open a web browser and navigate to:

https://localhost/Login

Note: You may see a security warning about the self-signed certificate. This is normal for initial setup.

Login with:

  • Username: myuser
  • Password: MySecurePass123!

Use the web interface to:

  1. Browse folders
  2. Upload files
  3. Download files
  4. Create new folders

Step 5: Test File Operations

Let's verify that file operations work correctly:

# Create test files
echo "Test content 1" > /tmp/file1.txt
echo "Test content 2" > /tmp/file2.txt

# Test upload via SFTP (using port 2222 as configured above)
sftp myuser@localhost << EOF
cd /Home/myuser
put /tmp/file1.txt
put /tmp/file2.txt
ls
quit
EOF

# Verify files exist in the physical directory
ls -la /var/ftp/myuser/

# Test download via FTP
ftp localhost << EOF
myuser
MySecurePass123!
cd /Home/myuser
get file1.txt /tmp/downloaded1.txt
get file2.txt /tmp/downloaded2.txt
quit
EOF

# Verify downloads
cat /tmp/downloaded1.txt
cat /tmp/downloaded2.txt

Step 6: Add More Users and Test Groups

Let's create additional users and organize them with groups:

# Create additional users
completeftp user add alice
completeftp user add bob

# Set passwords (interactive prompts)
completeftp user set alice password
completeftp user set bob password

# Create a group
completeftp group add developers

# Add users to the group
completeftp group memberadd developers alice bob

# Create a group folder
sudo mkdir -p /var/ftp/developers
sudo chown completeftp:completeftp /var/ftp/developers
completeftp folder add /Developers OS --mapping=/var/ftp/developers

# Set group permissions
completeftp folder chown /Developers group developers
completeftp folder chmod /Developers group rwxd

Test Group Access

# Test alice can access the developers folder
sftp alice@localhost << EOF
cd /Developers
put /tmp/file1.txt
ls
quit
EOF

# Verify the file is there
ls -la /var/ftp/developers/

Step 7: Configure Basic Security

Let's improve security by enabling SSH key authentication:

# Generate SSH keys for alice (if not already done)
ssh-keygen -t ed25519 -f /tmp/alice_key -N ""

# Add the public key to alice's account
completeftp user key add alice "$(cat /tmp/alice_key.pub)"

# Test SSH key authentication (port 2222 as configured)
sftp -i /tmp/alice_key alice@localhost << EOF
ls
quit
EOF

Step 8: Monitor and Troubleshoot

Check Service Status

# Check CompleteFTP service
sudo systemctl status completeftp

# View recent logs
sudo journalctl -u completeftp --no-pager -n 50

# Monitor logs in real-time
sudo journalctl -u completeftp -f

Check Connections

# See active connections
sudo netstat -tlpn | grep completeftp

# Check listening ports
sudo ss -tlpn | grep completeftp

Test Connectivity

# Test FTP port
telnet localhost 21

# Test SFTP port
telnet localhost 22

# Test HTTPS
curl -k https://localhost/

Understanding the Setup

What We've Created

  1. User Account: myuser with password authentication
  2. Home Directory: /Home/myuser mapped to /var/ftp/myuser
  3. Shared Folder: /Shared for common access
  4. Group Structure: developers group with members
  5. Multiple Protocols: FTP, SFTP, and HTTPS access

File System Structure

CompleteFTP Virtual File System:
├── /Home/
│   ├── myuser/           → /var/ftp/myuser
│   ├── alice/            → /var/ftp/alice
│   └── bob/              → /var/ftp/bob
├── /Shared/              → /var/ftp/shared
└── /Developers/          → /var/ftp/developers

Common Issues and Solutions

Connection Refused

# Check if service is running
sudo systemctl status completeftp

# Check firewall
sudo ufw status  # Ubuntu/Debian
sudo firewall-cmd --list-all  # Red Hat

Permission Denied

# Check folder permissions
completeftp folder show /Home/myuser access

# Verify user group membership
completeftp group memberlist developers

Authentication Failed

# Check user exists and is enabled
completeftp user show myuser enabled

# Verify protocol is enabled
completeftp user show myuser sftpEnabled ftpEnabled

Next Steps

Now that you have a working CompleteFTP server, consider:

Security Hardening

  1. SSL Certificates: Install proper SSL certificates for production use
  2. SSH Keys: Configure SSH key authentication for all users
  3. Firewall Rules: Restrict access to specific IP ranges
  4. User Policies: Implement password policies and user quotas

Advanced Configuration

  1. Site Configuration: Create multiple sites for different purposes
  2. Advanced Folders: Set up cloud storage integration
  3. User Management: Implement user groups and permissions
  4. Monitoring: Set up logging and monitoring

Production Preparation

  1. License Activation: Activate for remote access
  2. Backup Strategy: Implement configuration and data backups
  3. Performance Tuning: Optimize for your specific use case
  4. Documentation: Document your configuration for team use

Reference Documentation

Summary

You've successfully:

  • Created users with password authentication
  • Set up folder structure with proper permissions
  • Tested FTP, SFTP, and HTTPS connections
  • Verified file upload and download operations
  • Configured basic group-based access control
  • Tested SSH key authentication

Your CompleteFTP server is now ready for basic use. Consider the next steps above to enhance security and functionality for your specific requirements.