linux上搭建ftp服务

linux上搭建ftp服务简要过程。

1.安装

在目标主机上安装对应软件。

rpm -qa | grep vsftpd		# 查看是否已经安装了vsftpd软件
yum install -y vsftpd		# 安装

2.配置

安装好了之后可在这个路径下编辑配置文件,按需配置,这里采用默认。

vi /etc/vsftpd/vsftpd.conf		

[外链图片转存失败,源站可能有防盗链机制,建议将图片保存失败,源站可能有防盗链机制,建议将图片保存下来直接上传上传(imICO2fgg3wU-1688120810480)(D:/Work/office-home/OneDrive/work/Help/Pictures_typora/image-20230630100954867.png)(D:/Work/office-home/OneDrive/work/Help/Pictures_typora/image-20230630100954867.png)]

其中local_umask掩码代表要去除的权限,如022代表上传后的文件权限为:666-022=644 -> rw-r–r–

创建新的ftp用户

useradd ftp_user
passwd ftp_user		# 输入密码a123456

3.启动vsftp服务

systemctl start vsftpd.service
systemctl status vsftpd.service		# 查看服务状态

猜你喜欢

转载自blog.csdn.net/m0_61251376/article/details/131482157