FTP服务器搭建

本文详细介绍了在Ubuntu系统中如何一步步搭建FTP服务器。首先通过sudo apt-get install vsftpd命令安装vsftpd服务,然后确认安装并新建FTP用户及指定工作目录。接着为用户设置密码,并修改vsftpd配置文件/vsftpd.conf,确保local_root变量指向正确的FTP路径,以解决文件上传问题。参考多个技术博客完成配置。
摘要由CSDN通过智能技术生成

1)安装vsftpd:sudo apt-get install vsftpd

2) 检查是否安装了vsftpd ,执行以下命令

vsftpd -version

3)新建文件

mkdir /home/ftp

4)新建FTP用户并设置密码以及工作目录 ftpname为你为该ftp创建的用户名

sudo useradd -d /home/ftp -s /bin/bash ftpname

5)为新建的用户设置密码

passwd ftpname

6)修改vsftpd配置文件

vim /etc/vsftpd.conf

listen=NO
listen_ipv6=YES

# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO

# Uncomment this to allow local users to log in.
local_enable=YES

# Uncomment this to enable any form of FTP write command.
write_enable=YES

# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022

# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值