SELinux基础
来源:互联网 发布:redtube最新软件 编辑:程序博客网 时间:2024/04/29 17:52
1.概述
SECURE ENHANCED LINUX(SElinux)是一个内核级的安全机制,主流SELinux发行版本都会集成,CENTOS默认开启selinux
对SELinux的修改一般需要重新启动。
2.所有安全机制都是对进程和系统资源做出限制
SElinux针对这两种类型定义了两个基本概念:域(进程)和上下文(资源)
ps -Z 可以查看进程的域
ls -Z可以查看文件的上下文
[ming@localhost ~]$ ps -Z
LABEL PID TTY TIME CMD
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 2415 pts/0 00:00:00 bash
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 2429 pts/0 00:00:00 ps
[ming@localhost ~]$ ls -Z
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Desktop
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Documents
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Downloads
drwxr-xr-x. ming ming unconfined_u:object_r:audio_home_t:s0 Music
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Pictures
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Public
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Templates
drwxr-xr-x. ming ming unconfined_u:object_r:user_home_t:s0 Videos
[ming@localhost ~]$
3.策略
通过定义策略来控制那些域可以访问那些上下文,通常不需要自定义策略。
4.SELinux的工作模式
5.格式解释
应用实例:
-rw-r--r--. root root unconfined_u:object_r:admin_home_t:s0 index.html ---------》》》引起错误
恢复上下文
- SELinux基础
- SELinux 基础
- selinux基础
- 【Linux基础】SELinux
- linux基础之selinux
- SElinux 基础配置 基础语法
- selinux
- SELinux
- SELinux
- SELinux
- SELinux
- SELinux
- selinux
- SELinux
- SElinux
- Selinux
- SELinux
- SElinux
- Python学习——python打印汉字
- kernel crash analysis
- java awt初学
- 互斥体、原子操作、自旋锁、信号量
- 构建高可扩Web架构和分布式系统实战
- SELinux基础
- 到底怎样解决软件包依赖?
- jQuery验证控件jquery.validate.js使用说明+中文API
- Android Textview加中线
- mit 6.002 circuits & electronics video note
- 安卓-----打开新的Activity,并传递若干个参数给它
- WEB前端开发必备的辅助软件工具
- LINUX下非交互加入root权限用户和修改密码的python小程序
- aspnetpager+repeater+oracle实现分页功能