您的位置:首页 > 运维架构 > Linux

Centos FTP文件传输服务学习笔记之《搭建匿名访问的FTP服务》

2019-04-26 18:09 399 查看

运行环境 : CentOS release 6.10 (Final)

一、安装FTP服务软件

[code][ywz@server ~]$ sudo yum -y install vsftpd

二、准备匿名FTP访问目录

三、开放匿名用户配置并启动vsftpd服务

配置好vsftpd后启动

[code][ywz@server ~]$ sudo service vsftpd start
为 vsftpd 启动 vsftpd:                                    [确定]

四、测试匿名FTP服务器

在客户端安装FTP客户端(另一台虚拟机)

[code][ywz@client ~]$ sudo yum -y install ftp

创建测试文件并进行测试 

[code][ywz@client ~]$ echo ceshiwenjian > anon_ftptest.txt
[ywz@client ~]$ ftp 192.168.217.128
Connected to 192.168.217.128 (192.168.217.128).
220 (vsFTPd 2.2.2)
Name (192.168.217.128:ywz): ftp
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,217,128,110,200).
150 Here comes the directory listing.
drwxr-xr-x    2 14       0            4096 Mar 22  2017 pub
226 Directory send OK.
ftp> cd pub
250 Directory successfully changed.
ftp> mkdir anonftptest.dir
257 "/pub/anonftptest.dir" created
ftp> put anon_ftptest.txt
local: anon_ftptest.txt remote: anon_ftptest.txt
227 Entering Passive Mode (192,168,217,128,243,66).
150 Ok to send data.
226 Transfer complete.
13 bytes sent in 0.000299 secs (43.48 Kbytes/sec)
ftp> ls
227 Entering Passive Mode (192,168,217,128,245,237).
150 Here comes the directory listing.
-rw-r--r--    1 14       50             13 Apr 26 10:03 anon_ftptest.txt
drwxr-xr-x    2 14       50           4096 Apr 26 10:02 anonftptest.dir
226 Directory send OK.

    测试小结:匿名用户具有新建目录、上传文件、删除文件的权限,新建目录默认权限为755,文件上传默认权限为644

接下来是搭建本地用户验证的FTP服务 走你

 

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: