linux开启ftp服务,windows系统上传文件至linux系统。附部分出现的错误

小白一个~都不知道如何开启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(账号对应的文件夹)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值