码迷,mamicode.com
首页 > 其他好文 > 详细

6月技术指标

时间:2018-09-10 15:44:43      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:any   comment   服务器   war   lis   when   inux   更新   hang   

CentOS系统安装FTP服务器。(考试30分钟)
1.开启匿名上传
2.新建一个ftp用户 wy,密码设置为onlyidc2018,FTP目录设置为/var/ftp/wy并且可以上传删除文件。
[root@mysql200 ~]# systemctl stop firewalld.service
[root@mysql200 ~]# setenforce 0
[root@mysql200 ~]# mount /dev/cdrom /media/
mount: /dev/sr0 写保护,将以只读方式挂载
[root@mysql200 ~]# cd /media/Packages/
[root@mysql200 Packages]# rpm -q vsftpd
vsftpd-3.0.2-22.el7.x86_64
[root@mysql200 Packages]# rpm -ivh vsftpd-3.0.2-22.el7.x86_64.rpm
警告:vsftpd-3.0.2-22.el7.x86_64.rpm: 头V3 RSA/SHA256 Signature, 密钥 ID f4a80eb5: NOKEY
准备中... ################################# [100%]
软件包 vsftpd-3.0.2-22.el7.x86_64 已经安装
[root@mysql200 Packages]# systemctl start vsftpd
[root@mysql200 Packages]# systemctl enable vsftpd
[root@mysql200 Packages]# systemctl status vsftpd
● vsftpd.service - Vsftpd ftp daemon
Loaded: loaded (/usr/lib/systemd/system/vsftpd.service; enabled; vendor preset: disabled)
Active: active (running) since 四 2018-09-06 20:44:22 CST; 22min ago
Main PID: 1124 (vsftpd)
CGroup: /system.slice/vsftpd.service
└─1124 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf

9月 06 20:44:22 mysql200.example.com systemd[1]: Starting Vsftpd ftp daemon...
9月 06 20:44:22 mysql200.example.com systemd[1]: Started Vsftpd ftp daemon.
Hint: Some lines were ellipsized, use -l to show in full.
[root@mysql200 Packages]# netstat -antulp | grep vsftpd
tcp6 0 0 :::21 :::* LISTEN 1124/vsftpd
[root@mysql200 Packages]# vi /etc/vsftpd/vsftpd.conf

Allow anonymous FTP? (Beware - allowed by default if you comment this out).

anonymous_enable=YES
#

Uncomment this to allow local users to log in.

When SELinux is enforcing check for SE bool ftp_home_dir

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.

When SELinux is enforcing check for SE bool allow_ftpd_anon_write, allow_ftpd_full_access

anon_upload_enable=YES
[root@mysql200 Packages]# systemctl restart vsftpd
[root@mysql200 Packages]# setfacl -m u:ftp:rwx /var/ftp/pub/
[root@mysql200 Packages]# useradd wy
[root@mysql200 Packages]# echo onlyidc2018 | passwd --stdin wy
更改用户 wy 的密码 。
passwd:所有的身份验证令×××已经成功更新。
[root@mysql200 Packages]# mkdir /var/ftp/wy
[root@mysql200 Packages]# setfacl -m u:wy:rwx /var/ftp/wy

6月技术指标

标签:any   comment   服务器   war   lis   when   inux   更新   hang   

原文地址:http://blog.51cto.com/13673837/2173193

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!