小白一个~都不知道如何开启ftp服务。
在windows上直接“ftp:ip地址”的方法尝试连接,当然失败告终
正文
一、linux安装ftp服务
我用的是Ubuntu Server 20.04 LTS 64bit系统
apt install vsftpd
安装了ftp。
二、配置
在网上搜索到部分vsftpd配置是在/etc/user_list来设置能允许访问得用户列表。但是以yum方式安装的。
刚以apt安装之后需要vsftpd.conf、ftpusers配置完成
注:ftpusers是禁止的用户列表!!!
具体的允许上传下载的配置在vsftpd.conf文件里,主要是这几项
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=YES
#
# 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
#
# 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
三、windows连接linux
在这之前先开启linux的ftp服务
sudo service vsftpd
windows系统:
打开命令行,以“ftp ip地址”格式

会让你输入账号和密码的(root账号不能登陆,除非在ftpusers配置过)
之后输入命令。(一定记得配置,否则报权限问题)
同时需要在linux系统上赋予该ubuntu账号下的文件权限(chmod ...在此不赘述)
可以用cd命令进入某文件夹再put上传文件;默认是进入/home/ubuntu(账号对应的文件夹)
本文详细介绍了在Ubuntu Server 20.04 LTS上安装和配置FTP服务,使用vsftpd作为FTP服务器,并指导如何从Windows系统通过命令行连接Linux FTP服务器。配置重点包括vsftpd.conf文件的修改,如启用匿名FTP、本地用户登录、写入权限等。同时,文章也提到了Windows连接时的注意事项,如账号密码输入、文件权限设置等。
758

被折叠的 条评论
为什么被折叠?



