侧边栏壁纸
博主头像
EchoSpace博主等级

Have mind ,Have future!

  • 累计撰写 15 篇文章
  • 累计创建 1 个标签
  • 累计收到 0 条评论

目 录CONTENT

文章目录

ubuntu22.04配置ftp服务器

echowang
2024-08-09 / 0 评论 / 0 点赞 / 7 阅读 / 1196 字


在 Ubuntu 上配置 FTP 服务器

1. 安装 FTP 服务器软件

sudo apt install proftpd


2. 配置 FTP 服务器

    #编辑配置文件 /etc/proftpd/proftpd.conf:

sudo vi /etc/proftpd/proftpd.conf

    #在配置文件中,找到以下部分并进行修改:

ServerName "My FTP Server" #将 ServerName 修改为您的 FTP 服务器名称。
Port 21   #将 Port 修改为 FTP 服务器端口号。
DefaultRoot /home/%u  #将 DefaultRoot 修改为 FTP 用户的默认根目录。
RequireValidShell off   #将 RequireValidShell 修改为 off,允许用户即使没有有效的 shell 也能访问 FTP 服务器。
MasqueradeAddress off      #将 MasqueradeAddress 修改为 off,使用 FTP 服务器的真实 IP 地址而不是伪造的 IP 地址。
Port 21
DefaultRoot /home/%u
RequireValidShell off
MasqueradeAddress off

   

3. 创建 FTP 用户

1.创建 FTP 用户并设置密码:

    sudo adduser <username>  #将 <username> 替换为您的 FTP 用户名。

      

4. 重启 FTP 服务器

    sudo systemctl restart proftpd

0

评论区