当前位置: 首页 > news >正文

古典网站建设关键词推广优化app

古典网站建设,关键词推广优化app,中国的科技成就,展示型网站搭建网上已经有很多关于VSFTPD的配置,但有两个通病,要么就是原理介绍太多,要么就是不完整,操作下来又要查询多篇文章才能用。 我这里不讲原理,只记录操作,尽可能通过复制下面的操作可以实现FTP读写功能。方便自…

网上已经有很多关于VSFTPD的配置,但有两个通病,要么就是原理介绍太多,要么就是不完整,操作下来又要查询多篇文章才能用。

我这里不讲原理,只记录操作,尽可能通过复制下面的操作可以实现FTP读写功能。方便自己和他人。

CentOS7 vsFTPd版本:3.0.2

一、FTP安装和操作命令

[root@localhost etc]# yum -y install vsftpd      //安装VSFTPD
[root@localhost etc]# systemctl status vsftpd  //查看VSFTPD状态
[root@localhost etc]# systemctl start vsftpd    //启动VSFTPD状态
[root@localhost etc]# firewall-cmd --permanent --zone=public --add-port=21/tcp  //打开防火墙21端口
[root@localhost etc]# firewall-cmd --zone=public --add-port=4500-5000/tcp --permanen //被动模式需要的端口
[root@localhost etc]# firewall-cmd --reload   //重新加载防火墙配置
[root@localhost etc]# firewall-cmd --list-all    //查看防火墙已经开放的商口
[root@localhost etc]# netstat -ntlp | grep ftp  //查看当前所有tcp端口 (显示含有ftp的项)
[root@localhost etc]# vim /etc/vsftpd/vsftpd.conf  //修改vsftpd配置
[root@localhost etc]# vim /etc/vsftpd/user_list  //修改禁止本地账户列表
[root@localhost etc]# vim /etc/vsftpd/ftpusers   //修改禁止本地账户列表

通过上面最后两行命令,进入vim /etc/vsftpd/user_list 和/etc/vsftpd/ftpusers,分别将本地账户root注释掉,这样root账户才能使用,否则会报530错误。

二、配置vsftpd配置文件

通过命令:vim /etc/vsftpd/vsftpd.conf可以进入修改配置。
可以在末尾添加以下内容

#开启被动模式
pasv_enable=YES
pasv_min_port=4500
pasv_max_port=5000
tcp_wrappers=YESlisten_ipv6=YESpam_service_name=vsftpd#允许“禁止登陆名单”,名单文件为ftpusers与user_list
userlist_enable=YES#禁止匿名访问模式
anonymous_enable=NO#允许本地用户模式
local_enable=YES#设置本地用户模式进入的主目录位置
local_root=/#设置匿名模式进入的主目录位置
anon_root=/var#所有用户限定在其主目录内
chroot_local_user=YES
#配置会话时间
idle_session_timeout=1800
data_connection_timeout=120
allow_writeable_chroot=YES#设置可写入权限
write_enable=YES

三、修改SELinux 的状态

之前没改这个状态可以正常使用,但新的一次我试过,没有开启ftpd_full_access,新增文件或文件夹会报550错误,例如:550 Create directory operation failed.但删除没问题。

[root@campus /]# getsebool -a | grep ftp
ftpd_anon_write --> off
ftpd_connect_all_unreserved --> off
ftpd_connect_db --> off
ftpd_full_access --> off
ftpd_use_cifs --> off
ftpd_use_fusefs --> off
ftpd_use_nfs --> off
ftpd_use_passive_mode --> off
httpd_can_connect_ftp --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_home_dir --> off
[root@campus /]# setsebool -P ftpd_full_access 1
[root@campus /]# 
[root@campus /]# 
[root@campus /]# getsebool -a | grep ftp
ftpd_anon_write --> off
ftpd_connect_all_unreserved --> off
ftpd_connect_db --> off
ftpd_full_access --> on
ftpd_use_cifs --> off
ftpd_use_fusefs --> off
ftpd_use_nfs --> off
ftpd_use_passive_mode --> off
httpd_can_connect_ftp --> off
httpd_enable_ftp_server --> off
tftp_anon_write --> off
tftp_home_dir --> off
[root@campus /]# 

四、防火墙或路由器做映射和放开(对外网开放需要)

主要是做21端口的映射,具体这个就是因设备不同而不同操作,不做这一步,内网是能正常访问的了。

五、FTP连接和操作测试

通过以上操作,可以正常用root账户登录了。

PS C:\Users\jason> ftp
ftp>
ftp>
ftp> open192.168.8.12
连接到 192.168.8.12。
220 (vsFTPd 3.0.2)
200 Always in UTF8 mode.
用户(192.168.8.12:(none)): root
331 Please specify the password.
密码:
230 Login successful.
ftp>
ftp>
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
bin
boot
dev
etc
home
lib
lib64
media
mnt
opt
proc
root
run
sbin
srv
sys
tmp
usr
var
226 Directory send OK.
ftp: 收到 107 字节,用时 0.0053.50千字节/秒。
ftp> cd root
250 Directory successfully changed.
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
anaconda-ks.cfg
index.html
initial-setup-ks.cfg
mysql-server
mysql80-community-release-el7-6.noarch.rpm
下载
公共
图片
文档
桌面
模板
视频
音乐
226 Directory send OK.
ftp: 收到 176 字节,用时 0.0058.67千字节/秒。
ftp> mkdir test
257 "/root/test" created
ftp>

六、设置开机自启动

设置开机自启动使命

[root@campus ~]# systemctl enable vsftpd
Created symlink from /etc/systemd/system/multi-user.target.wants/vsftpd.service to /usr/lib/systemd/system/vsftpd.service.
[root@campus ~]#

后记:以上操作为完整的可以使用root账号登录的操作,暂时可以实现我的传输文件的需求。linux默认是不允许root账号登录FTP的,可能担心一些安全性问题。如果需要进一步,就是开启账户登录功能,后面有时间我再测试补充。
如果你按照我上面的方法,在开启过程中出现任何故障,欢迎留言或私信给我。

http://www.yidumall.com/news/12520.html

相关文章:

  • 做网站需要的图片去哪找技术教程优化搜索引擎整站
  • 零基础学计算机难吗上海还能推seo吗
  • 怎么给新公司做网站网络销售平台怎么做
  • 浙江省工程建设信息官方网站留号码的广告网站不需要验证码
  • 做字幕网站网页模板源代码
  • wordpress 全屏图片抖音seo优化怎么做
  • 滨海做网站网站建设方案模板
  • 邯郸网站改版找谁做百度的seo排名怎么刷
  • 纸 技术支持 东莞网站建设真正永久免费的建站系统有哪些
  • 湖北金扬建设网站企业网站排名优化
  • wordpress选不了中文seo含义
  • 珠海企业医疗网站建设如何免费注册网站平台
  • 长沙个人做网站排名中国联通腾讯
  • 电子商务网站开发技术国外搜索引擎网站
  • 免费net网站空间免费的推广软件下载
  • 百度如何才能搜到你的网站蚌埠网络推广
  • 企业手机网站建设策划方案免费网站收录入口
  • 网网站站建建设设seo怎样才能优化网站
  • 网站做app开发关于友情链接的作用有
  • 斐讯n1 WordPress网络优化大师
  • 网站添加在线支付媒体软文推广平台
  • 大庆 网站建设常德seo快速排名
  • 湘西网站建设优化关键词排名提升
  • 沈阳免费seo关键词优化排名怎样优化网站排名
  • 唐山高端网站建设蜜雪冰城推广软文
  • 怎么做企业营销型网站网站推广的具体方案
  • 做一建真题的网站国家免费技能培训有哪些
  • 北京seo网站推广今天的新闻 最新消息摘抄
  • b2c的网站营销的概念是什么
  • 城市建设法规考试网站seo外包优化公司