【推荐】Ubuntu 18.04下搭建FTP服务器

以下以系统用户为a为例

====================

1、安装vsftpd服务

sudo apt install vsftpd

#sudo apt remove --purge vsftpd:彻底删除vsftpd服务,包括配置文件

-------------------------------------

2、新建名为myftp的文件夹

sudo mkdir myftp

-------------------------------------

3、新建ftp用户userftp01

sudo useradd -d /home/a/myftp/ -s /bin/bash userftp01

#-d /home/a/myftp/ 指定用户的目录

#-s /bin/bash 指定是用什么类型的命令解析器,shell

-------------------------------------

4、设备用户userftp01口令

sudo passwd userftp01

-------------------------------------

5、编辑配置文件

sudo vim /etc/vsftpd.conf

#配置参数参照下图

(注意:#listen_ipv6)

 

-------------------------------------

6、启动服务

sudo service vsftpd start

-------------------------------------

7、首先在ubuntu下验证一下

 Exit

#退出 ftp

-------------------------------------

8、查看IP

Ifconfig

-------------------------------------

9、用flashfxp连接建立的ftp服务器

======================

关于权限设置

如果在连接ftp后无法创建目录

则sudo chmod 777 myftp

同时

如果flashfxp无法上传,提示550 permission denide,则修改vsftpd.conf

# Uncomment this to allow the anonymous FTP user to upload files. This only

# has an effect if the above global write enable is activated. Also, you will

# obviously need to create a directory writable by the FTP user.

anon_upload_enable=YES

#

# Uncomment this if you want the anonymous FTP user to be able to create

# new directories.

anon_mkdir_write_enable=YES

======================

其他

#创建文件touch

 

电脑技术 2024-03-19 21:02:24 通过 网页 浏览(213)

共有0条评论!

发表评论

更换一道题!