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

找做网站签证互联网站备案手续

找做网站签证,互联网站备案手续,怎么在百度发广告,做视频投稿赚钱的网站好SElinux SElinux简介 SELinux是Security-Enhanced Linux的缩写#xff0c;意思是安全强化的linux SELinux 主要由美国国家安全局#xff08;NSA#xff09;开发#xff0c;当初开发的目的是为了避免资源的误用 传统的访问控制在我们开启权限后#xff0c;系统进程可以直…SElinux SElinux简介 SELinux是Security-Enhanced Linux的缩写意思是安全强化的linux SELinux 主要由美国国家安全局NSA开发当初开发的目的是为了避免资源的误用 传统的访问控制在我们开启权限后系统进程可以直接访问 当我们对权限设置不严谨时这种访问方式就是系统的安全漏洞 在开启SElinux后 会对进程本身部署安全上下文 会对文件部署安全上下文 会对服务使用端口进行限制 会对程序本身的不安全功能做限制 SElinux工作原理 SElinux工作方式 SELinux是通过MAC的方式来控制管理进程它控制的主体是进程而目标则是该进程能否读取的文件资源 主体subject就是进程 目标object被主体访问的资源可以是文件、目录、端口等。 策略policy由于进程与文件数量庞大因此SELinux会依据某些服务来制定基本的访问安全策略         targeted针对网络服务限制较多针对本机限制较少是默认的策略         strict完整的SELinux限制限制方面较为严格。 SElinux安全上下文 安全上下文security context 主体能不能访问目标除了策略指定外主体与目标的安全上下文必须一致才能够顺利访问。 最终文件的成功访问还是与文件系统的rwx权限设置有关 查看是否开启SElinux 已开启的主机 [rootlocalhost ~]# getenforce Disabled [rootlocalhost ~]# grubby --update-kernel ALL --args selinux1 [rootlocalhost ~]# reboot [rootlocalhost ~]# dnf install vsftpd -y [rootlocalhost ~]# systemctl start vsftpd.service [rootlocalhost ~]# vim /etc/vsftpd/vsftpd.conf [rootlocalhost ~]# systemctl restart vsftpd.service [rootlocalhost ~]# chmod 777 /var/ftp/pub/ [rootlocalhost ~]# ps axZ |grep vsftpd system_u:system_r:ftpd_t:s0-s0:c0.c1023 1924 ? Ss 0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 1965 pts/0 S 0:00 grep --colorauto vsftpd [rootlocalhost ~]# touch /mnt/leefile [rootlocalhost ~]# ls -Z /mnt/ unconfined_u:object_r:default_t:s0 file1 unconfined_u:object_r:default_t:s0 file3 unconfined_u:object_r:default_t:s0 file5 unconfined_u:object_r:default_t:s0 file2 unconfined_u:object_r:default_t:s0 file4 unconfined_u:object_r:mnt_t:s0 leefile 对文件的影响 [rootlocalhost ~]# mv /mnt/leefile /var/ftp/ [rootlocalhost ~]# cd /var/ftp/ [rootlocalhost ftp]# ls leefile pub [rootlocalhost ftp]# curl ftp://172.25.254.129 drwxrwxrwx 2 0 0 6 May 09 2023 pub[rootlocalhost ftp]# lftp 172.25.254.129 lftp 172.25.254.129:~ ls drwxrwxrwx 2 0 0 6 May 09 2023 pub lftp 172.25.254.129:/ cd pub/ lftp 172.25.254.129:/pub ls lftp 172.25.254.129:/pub put /etc/passwd put: /etc/passwd: Access failed: 553 Could not create file. (passwd) lftp 172.25.254.129:/pub ls[rootlocalhost ftp]# 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 对端口的影响 [rootlocalhost ftp]# vim /etc/ssh/sshd_config [rootlocalhost ftp]# systemctl restart sshd Job for sshd.service failed because the control process exited with error code. See systemctl status sshd.service and journalctl -xeu sshd.service for details. 未开启的主机 [rootlocalhost ~]# getenforce Disabled [rootlocalhost ~]# dnf install vsftpd -y [rootlocalhost ~]# systemctl start vsftpd.service [rootlocalhost ~]# vim /etc/vsftpd/vsftpd.conf [rootlocalhost ~]# systemctl restart vsftpd.service [rootlocalhost ~]# chmod 777 /var/ftp/pub/ [rootlocalhost ~]# ps axZ |grep vsftpd - 1805 ? Ss 0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf - 1832 pts/0 S 0:00 grep --colorauto vsftpd [rootlocalhost ~]# touch /mnt/leefile [rootlocalhost ~]# ls Z /mnt/ ls: cannot access Z: No such file or directory /mnt/: hgfs leefile 对文件的影响 [rootlocalhost ~]# mv /mnt/leefile /var/ftp/ rootlocalhost ~]# cd /var/ftp/ [rootlocalhost ftp]# ls leefile pub [rootlocalhost ftp]# lftp 172.25.254.133 lftp 172.25.254.133:~ ls -rw-r--r-- 1 0 0 0 Dec 11 09:21 leefile drwxrwxrwx 2 0 0 6 May 09 2023 pub lftp 172.25.254.133:/ quit [rootlocalhost ftp]# curl ftp://172.25.254.133 -rw-r--r-- 1 0 0 0 Dec 11 09:21 leefile drwxrwxrwx 2 0 0 6 May 09 2023 pub[rootlocalhost ftp]# lftp 172.25.254.133 lftp 172.25.254.133:~ ls -rw-r--r-- 1 0 0 0 Dec 11 09:21 leefile drwxrwxrwx 2 0 0 6 May 09 2023 pub lftp 172.25.254.133:/ cd pub/ lftp 172.25.254.133:/pub put /etc/passwd 2199 bytes transferred lftp 172.25.254.133:/pub ls -rw------- 1 14 50 2199 Dec 11 09:42 passwd[rootlocalhost ftp]# getsebool -a |grep ftp getsebool: SELinux is disabled 对端口的影响 [rootlocalhost ftp]# systemctl restart sshd 安全上下文的查看 文件的安全上下文 [rootlocalhost ~]# ls -Zsystem_u:object_r:admin_home_t:s0 anaconda-ks.cfg unconfined_u:object_r:admin_home_t:s0 at_job.sh进程的安全上下文 [rootlocalhost ~]# ps axZ |grep vsftpd system_u:system_r:ftpd_t:s0-s0:c0.c1023 1924 ? Ss 0:00 /usr/sbin/vsftpd /etc/vsftpd/vsftpd.conf unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 2341 pts/0 S 0:00 grep --colorauto vsftpd 安全上下文用冒号分为四个字段Identifyroletype 身份标识Identify相当于账号方面的身份标识主要有以下三种常见的类型   root 表示root的账号身份   system_u 表示程序方面的标识通常就是进程   unconfined_u代表的是一般用户账号相关的身份。 角色role通过角色字段可知道这个数据是属于程序、文件资源还是代表用户。一般角色有   object_r 代表的是文件或目录等文件资源   system_r 代表的是进程。 类型type在默认的targeted策略中Identify与role字段基本上是不重要的重要的在于这个类型字段。而类型字段在文件与进程的定义不太相同分别是   type 在文件资源上面称为类型。   domain 在主体程序中则称为域 domain需要与type搭配则该程序才能够顺利读取文件资源。 代表灵敏度一般用s0、s1、s2来命名数字代表灵敏度的分级。数值越大、灵敏度越高 对于SElinux的管理及优化 SElinux工作模式 SElinux有三种工作模式   enforcing强制模式开始限制domain/type。   permissive宽容模式仅会有警告信息并不会实际限制domain/type的访问。   disabled关闭SELinux并没有实际运行。 对于SElinux状态管理 1.查看SElinux当前状态查看 [rootlocalhost ~]# getenforce Enforcing 2.临时更改SElinux的工作模式 [rootlocalhost ~]# setenforce 0 [rootlocalhost ~]# getenforce Permissive [rootlocalhost ~]# setenforce 1 [rootlocalhost ~]# getenforce Enforcing 3.永久更改SElinux状态永久更改SElinux的状态需要在更改后重启系统才能生效 在RHEL9之前的版本中通过文件来永久更改SElinux的状态 [rootlocalhost ~]# vim /etc/selinux/config SELINUXenforcing|permissive|disabled 在RHEL9中需要通过修改内核启动参数来永久更改SElinux的状态 [rootlocalhost ~]# grubby --update-kernel ALL --args selinux0 [rootlocalhost ~]# grubby --update-kernel ALL --remove-args selinux 4.重启SElinux 系统在开启SElinux后重启系统SElinux的所有内容不会有任何变化如果需要刷新SElinux [rootlocalhost ~]# touch /.autorelabel
http://www.pierceye.com/news/915712/

相关文章:

  • 介绍自己做的网站的论文网站模块建设中
  • 诸城手机网站建设微官网怎么制作
  • 做网站界面的软件网站开发售后服务
  • 织梦可以做英文网站吗成交型网站建设公司
  • 长沙招聘网站制作广告设计公司需要用专线网吗
  • 一级做爰A视频免费网站国内疫苗接种率
  • 绍兴网站公司网站制作163邮箱登录页面
  • 阐述电子商务网站的建设要求网站开发总结性报告
  • html与wordpressaso优化方法
  • 众v创业营网站开发营销活动方案策划
  • 什么网站免费做推广抚州北京网站建设
  • 响应式网站 软件做网站下载那个数据库好
  • 网站loading动画效果微信开放平台介绍
  • 山东网站建设报价网页制作与网站建设答案
  • 佛山网站搭建费用淄博刚刚发布紧急通知
  • 建站教程视频下载视频直播软件开发
  • 后缀cc的网站php网站开发实例教程代码百度云
  • 注册好域名之后怎么做个人网站如何用服务器代替空间做网站
  • 电商网站建设懂你所需网络品牌营销推广途径
  • 10大免费软件下载网站推荐购物网站域名大小
  • 网站建设项目安排计划表wordpress博客官网登陆账号密码
  • 无锡网络公司网站建设app微信公众号平平面设计培训价格
  • 免费的黄冈网站有哪些平台可以用微信支付制作网站的步骤和过程
  • 杭州的网站设计公司漂亮的网站是什么建设出来的
  • 全屏网站代码佛山专业网站建设公司推荐
  • 自己做信息网站有什么设计网站
  • 检察网站建设请示wordpress 重定向多
  • 做网站用什么服务器比较好线上推广网络公司
  • 长春营销型网站制作内蒙古建设部网站官网
  • 做家教的网站微网站可以自己做吗