Video failed to load

Installing an FTP Service on XC Operating Systems

434 words
2 minutes
Installing an FTP Service on XC Operating Systems
Installing an FTP Service on XC Operating Systems

Translation Notice

This article was originally written in Chinese and translated into English with the assistance of AI. The translation has been reviewed and edited for clarity, accuracy, and readability. Please refer to the original source where necessary, especially for technical terms, commands, configuration details, and proper nouns.

As the 2027 IT-modernization transition milestone approaches, more public institutions and state-owned enterprises are replacing existing operating systems with domestic alternatives. Meanwhile, because CentOS has reached end of life (EOL), many existing servers need to migrate.

The major independently controlled domestic operating systems currently include:

  • OpenEuler
  • Anolis OS
  • KylinOS
  • UnionTech UOS

In network-operations environments, many network devices still rely on FTP servers for log and configuration backups, so a stable and reliable FTP service remains necessary.


1. Install the FTP Service#

Recommended: vsftpd

Advantages:

  • High security
  • Stable and mature
  • Low resource usage
  • Good compatibility with domestic operating systems

2. Offline Installation (Recommended for XC Environments)#

XC environments are typically isolated from the Internet and cannot connect to mirror sites, so RPM installation is recommended.

RPM download: https://rpmfind.net/

rpmfind
rpmfind

Download: vsftpd-3.0.3-36.el8.x86_64.rpm (choose the version for your system; el8 is generally compatible with XC systems).

  1. Upload to the server: scp vsftpd*.rpm root@server:/root
  2. Install: rpm -ivh vsftpd-3.0.3-36.el8.x86_64.rpm
  3. Verify: vsftpd -v
  4. Output: vsftpd: version 3.0.3

This confirms a successful installation.

3. Online Installation#

Terminal window
# Ubuntu / Debian:
apt install vsftpd -y
# CentOS / OpenEuler / Anolis:
yum install vsftpd -y
# RockyLinux:
dnf install vsftpd -y

4. Core vsftpd Configuration#

Configuration file: /etc/vsftpd/vsftpd.conf

Edit with: nano /etc/vsftpd/vsftpd.conf

5. Key Configuration Details#

Basic Security Configuration#

  1. anonymous_enable=NO → Disable anonymous login
  2. local_enable=YES → Allow local users
  3. write_enable=YES → Allow uploads
  4. local_umask=022 → Default permissions
  5. userlist_enable=YES → Enable the denylist

Listening Configuration#

Terminal window
# Default configuration
listen=NO
listen_ipv6=YES
# IPv4 only
listen=YES
listen_ipv6=NO

User Isolation#

Terminal window
chroot_local_user=YES
allow_writeable_chroot=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/user_list

Purpose:

  • Prevent users from accessing system directories.
  • Must be enabled in production.

Passive-Mode Configuration#

Terminal window
pasv_enable=YES
pasv_min_port=10000
pasv_max_port=10030
pasv_address=192.168.1.1

Cloud servers must specify a public IP, otherwise connections will fail.


Configure the FTP Root Directory#

local_root=/home/ftp/data

6. Create the FTP Directory#

Terminal window
mkdir -p /home/ftp/data

7. Create an FTP User#

vsftpd authenticates against system accounts.

  1. Create: adduser ftpuser1
  2. Set the password: passwd ftpuser1

8. User-Directory Permissions#

Terminal window
# Create the directory
cd /home/ftp/data
mkdir ftpuser1
# Grant ownership and permissions
chown -R ftpuser1:ftpuser1 /home/ftp/data/ftpuser1
chmod 755 /home/ftp/data
chmod 755 /home/ftp/data/ftpuser1

9. Start the Service#

  • Start: systemctl start vsftpd
  • Stop: systemctl stop vsftpd
  • Enable at boot: systemctl enable vsftpd
  • Restart: systemctl restart vsftpd
  • Check status: systemctl status vsftpd

10. Firewall Configuration#

firewalld#

Terminal window
firewall-cmd --add-port=21/tcp --permanent
firewall-cmd --add-port=20/tcp --permanent
firewall-cmd --add-port=10000-10030/tcp --permanent
firewall-cmd --reload

iptables#

Terminal window
iptables -A INPUT -p tcp --dport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 20 -j ACCEPT
iptables -A INPUT -p tcp --dport 10000:10030 -j ACCEPT
iptables-save > /etc/sysconfig/iptables

11. Test the Connection#

ftpuser1
ftpuser1

Check whether the written file exists
Check whether the written file exists

12. Security Recommendations#

Recommendation: prevent system accounts from logging in

Terminal window
nano /etc/vsftpd/user_list
# Add the following users
root
bin
daemon

Restrict User Login#

Enable the allowlist: userlist_deny=NO

Then user_list becomes the list of permitted users.

Log Auditing#

  • Enable: xferlog_enable=YES
  • Log path: /var/log/xferlog

Support & Share

If this article helped you, please share or support!

Sponsor
Installing an FTP Service on XC Operating Systems
https://blog.bytesycn.cn/posts/77888a37-03a4-4d92-893a-2b79ed0ab923/
Author
Ryan Zhang
Published at
2026-03-24
Related PostsSmart
1
OpenSSH Security Upgrade Guide: Online and Offline Methods
TutorialOpenSSH is a core component for remote server access and administration. Its open-source nature sometimes exposes security vulnerabilities, but also drives continuous improvement. Upgrading is the most effective response, yet many Linux servers run in isolated environments and cannot update directly over the network. This guide explains how to securely upgrade OpenSSH by compiling and installing it offline.
2
Install Docker / Docker Compose
TutorialInstall Docker and Docker Compose online or offline.
3
TOTP Two-Factor Authentication for Windows Remote Logins
TutorialAdd TOTP-based two-factor authentication to Windows Remote Desktop (RDP) with multiOTP to improve remote-login security. Supports mainstream authenticators such as Google Authenticator and Tencent Authenticator.
4
🐾 OpenClaw Installation Guide and Personal Thoughts — 2026.03
TutorialA detailed guide to OpenClaw 2026.03, covering one-click Linux deployment, Feishu bot long connections, and local-model integration. It explores the security philosophy of private AI, emphasizing least privilege and data boundaries so idle hardware can become a powerful private assistant without sacrificing privacy.
5
After MinIO's Web Console Disappeared, It's Time for the CLI: An Introduction to mc
TutorialIn MinIO's community releases after 20250524, the open-source object-storage giant radically removed the core Web management console—deleting 110,000 lines of code. How can you manage MinIO with mc without a Web Console?
Random PostsRandom

Comments

Profile Image of the Author
Ryan Zhang
Keep building, keep thinking, keep creating.
Announcement
Welcome to my blog!
Categories
Tags
Latest Moments
Site Statistics
Posts
30
Categories
7
Tags
42
Total Words
117,260
Running Days
0 days
Last Activity
0 days ago
Table of Contents