SpaceCore WIKI
English
English
  • Personal Account and Registration
    • Account registration
    • «Customer» section
    • «Finance» section
    • Account Verification (KYC)
  • Customer service
    • How do I place an order?
    • How to contact support?
    • The Game Hosting panel
    • Setting Up BILLmanager 6 for Reselling
  • Communications
    • Notifications in Telegram
    • Web Hosting Notifications
    • Using a ping bot in Telegram
  • Information board
    • Blocked ports (VPS/VDS)
    • What is IOPS?
    • VAT for the EU and UK
  • VPS and Dedicated Servers
    • How to use VPS/VDS?
    • Changing the Password for VDS
  • OS and software configuration
    • Java [Linux]
    • Screen
    • Linux Password Recovery
    • Connecting via SSH keys
    • Disabling access to Linux using a password
    • Deploying MikroTik RouterOS on VDS
  • AI
    • Deploying DeepSeek on your server in just a few clicks
  • Windows
    • RDP connection
    • Configuring the RDP connection
    • Changing the password
    • Installation via QEMU
    • How to add an IPv4
    • Download files
    • Bruteforce Windows
  • Network Setup and Security
    • No interaction with private networks
    • Working with TCPDump
    • Change MTU Value
    • Configure IPTables
    • [DNS] Temporary failure resolving...
    • Network Speed Measurement [SpeedTest]
    • How do I buy a domain name?
    • How do I direct my domain to an IP address?
    • How to Protect Your Server? Basics of Cybersecurity
  • VPN and Privacy
    • WireGuard VPN [Easy]
    • OpenVPN [Easy]
    • Outline VPN Installation
    • Installing TorrServer
    • Installing 3X UI
    • Installing Marzban
    • Proxy for Specific Websites (V2RayN)
    • Use Nekoray
  • System monitoring
    • Traffic monitoring via VnStat
    • How to use the MTR tool
    • Getting Serial Numbers of Drives
  • Administration and Backups
    • Working with FTP Repository
    • Auto-shipment of backups
    • Installing an FTP Server
    • Mounting Linux Drives
  • Web development
    • Installing Apache2
    • Installing Nginx
    • Installing PHP
    • Installing MySQL
    • Installing PhpMyAdmin
    • Let's Encrypt SSL Generation
  • Minecraft
    • Installing Minecraft Java Server
    • Installing the Minecraft Bedrock/PE server
    • Installing the BungeeCord server
    • Installing Sponge Forge 1.12.2 Kernel
    • Configuring server.properties
    • Installing the icon on the server
    • Launch Options
    • Installing a resource pack on the server
  • Hetzner Servers
    • Control Panel
    • Password change via Rescue
    • Installing the operating system
  • 🇩🇪Contabo
    • The Control Panel
    • Disk space expansion
Powered by GitBook
On this page
  • Loading ProFTPD:
  • Limit FTP users to outside the home directory.
  • Location proftpd.conf:
  • Create a new FTP user:
  • Create a new user:
  • Additional Information:

Install and create an FTP user without using the control panel.

Loading ProFTPD:

Systems Debian/Ubuntu:

apt-get install proftpd

CentOS:

yum install epel-release
yum install proftpd

If the server does not start automatically, use the command to start manually:

service proftpd start

Limit FTP users to outside the home directory.

This article involves running the ProFTPD configuration "by default", in which case the user can go beyond his home directory and, although he has the rights to work with other folders, Probably not, but if the server’s configuration isn’t strong enough, it could be a security risk. You can solve this problem by adding one line to proftpd.conf file:

DefaultRoot ~

You can add it to the end of the file. After saving, restart the FTP server:

service proftpd restart

Location proftpd.conf:

The proftpd.conf configuration file can be located in different places depending on your OS version:

Ubuntu: /etc/proftpd.conf

Debian: /etc/proftpd/proftpd.conf

CentOS: /etc/proftpd.conf

Create a new FTP user:

Simple FTP users do not need to have access to the shell. Before you start creating new users, run the following command:

echo '/bin/false' >> /etc/shells

Create a new user:

useradd username -d /home/username - m -s /bin/false
passwd user_name

Using the commands above, we created a user (user’s name to be replaced with an unoccupied name) and the corresponding group, assigned and created (the -m key can be omitted if the directory already exists) the home directory /home/mailbox name, and also chose /bin/false as the user’s command shell, thus disabling it for security reasons. With the passwd command we created the user the necessary password.

In most cases, you can already connect to the FTP server on port 21 by default.

Additional Information:

Access to Shell (shell)

If you still want to give the user access to the shell, you must specify the path to any working, instead of /bin/false, for example:

/bin/sh

Or:

/bin/bash

Users of the conventional FTP protocol do not need to access the shell, so it is safer not to provide it.

Restriction of FTP user rights:

If necessary, you can close the write permissions for the user, for example to the home directory, and leave them only for some internal folder, for example upload.

On behalf of the superuser, change rights:

chmod 555 /home/folder_name
mkdir /home/folder_name/upload
chown username:username /home/foldername/upload

In this case, the second username is the group name, which by default is the same as the username you created.

Thus, in a short time and a small number of steps, you can create a secure basic FTP user and start working with FTP on the server.

PreviousAuto-shipment of backupsNextMounting Linux Drives

Last updated 11 months ago