#Setup FTP Server Using pure-ftpd on Debian Bullseye

  1. Update Your System:
    • Ensure your Debian system is up-to-date to avoid any compatibility issues. Open a terminal and execute the following commands:
      sudo apt-get update sudo apt-get upgrade
  2. Install pure-ftpd:
    • Install the pure-ftpd package by running:
      sudo apt-get install pure-ftpd
  3. Basic Configuration:
    • pure-ftpd comes with a sensible set of defaults, but you can customize its behavior by creating configuration files in /etc/pure-ftpd/conf/. For example, to enable passive mode ports, create a file named PassivePortRange:
      echo "30000 35000" | sudo tee /etc/pure-ftpd/conf/PassivePortRange
    • Restart pure-ftpd to apply the changes:
      sudo systemctl restart pure-ftpd
  4. Creating an FTP User:
    • It’s a good practice to create a dedicated user for FTP access. This limits access to the system and enhances security. To create a new user ftpuser with a home directory /home/ftpuser, execute:
      sudo useradd -m ftpuser -d /home/ftpuser -s /usr/sbin/nologin sudo passwd ftpuser
    • Follow the prompts to set a password for ftpuser.
  5. Adjust Firewall Settings (if applicable):
    • If you have a firewall enabled, ensure that it allows traffic on the FTP port (21 by default) and the passive mode port range defined earlier. For ufw, you can do this by running:
      sudo ufw allow 21/tcp sudo ufw allow 30000:35000/tcp
  6. Start and Enable pure-ftpd:
    • To ensure pure-ftpd starts automatically at boot, enable it using:
      sudo systemctl enable pure-ftpd
    • Start the pure-ftpd service:
      sudo systemctl start pure-ftpd

#Connect a Windows 11 Machine to the Debian FTP Server

#Using Built-In Windows FTP

  1. Open File Explorer:
    • Press Win + E to open the File Explorer.
  2. Access the FTP Server:
    • In the address bar, type ftp://<IP-of-the-FTP-Server> (replace <IP-of-the-FTP-Server> with the actual IP address of your Debian server) and press Enter.
  3. Login:
    • A prompt will appear asking for the username and password. Enter the credentials for the ftpuser you created earlier on the Debian server.
  4. Browse and Transfer Files:
    • If the credentials are correct, you should now be able to see and interact with the files on the Debian FTP server from your Windows 11 machine.