阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

SELinux导致故障解决实例

136次阅读
没有评论

共计 2520 个字符,预计需要花费 7 分钟才能阅读完成。

这样的报错还是第一次遇到,排查过程没有头绪,一直纠结在 child setpgid 这个地方,还好在 google 过程中看到有人在设置 selinux 的时候的相关案例,于是想到从这方面入手。

原因为 selinux 开启导致的,但是比较诡异的是从别的 terminal ssh 跳转过去之后无法执行任何操作,包括配置 selinux,后来还是从后台远程管理口登陆上去之后设置并重启,彻底解决这个问题。

-bash-4.3# ls
-bash: child setpgid (16790 to 16790): Permission denied
ls: cannot access RHEL6.2-20111117.0-Server-ppc64-DVD1.iso: Permission denied
ls: cannot access rhel-server-6.2-x86_64-dvd.iso: Permission denied
ls: cannot access install.log.syslog: Permission denied
ls: cannot access anaconda-ks.cfg: Permission denied
ls: cannot access install.log: Permission denied
anaconda-ks.cfg  Documents  install.log        Music    Public                                    rhel-server-6.2-x86_64-dvd.iso  Videos
Desktop          Downloads  install.log.syslog  Pictures  RHEL6.2-20111117.0-Server-ppc64-DVD1.iso  Templates
-bash-4.3# su – streamsadmin
-bash: child setpgid (16792 to 16792): Permission denied
-bash: su: command not found
-bash-4.3# top
-bash: child setpgid (16793 to 16793): Permission denied

        top: failed tty set: Input/output error
-bash-4.3# free -m
-bash: child setpgid (16794 to 16794): Permission denied
            total      used      free    shared    buffers    cached
Mem:        129045      18018    111026          0        227      15605
-/+ buffers/cache:      2186    126859
Swap:        10239          0      10239
-bash-4.3# cat .bash_profile
-bash: child setpgid (16796 to 16796): Permission denied
cat: .bash_profile: Permission denied
-bash-4.3# ls -l
-bash: child setpgid (16803 to 16803): Permission denied
ls: cannot access RHEL6.2-20111117.0-Server-ppc64-DVD1.iso: Permission denied
ls: cannot access rhel-server-6.2-x86_64-dvd.iso: Permission denied
ls: cannot access install.log.syslog: Permission denied
ls: cannot access anaconda-ks.cfg: Permission denied
ls: cannot access install.log: Permission denied
total 32
-?????????? ? ?    ?      ?            ? anaconda-ks.cfg
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Desktop
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Documents
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Downloads
-?????????? ? ?    ?      ?            ? install.log
-?????????? ? ?    ?      ?            ? install.log.syslog
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Music
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Pictures
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Public
-?????????? ? ?    ?      ?            ? RHEL6.2-20111117.0-Server-ppc64-DVD1.iso
-?????????? ? ?    ?      ?            ? rhel-server-6.2-x86_64-dvd.iso
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Templates
drwxr-xr-x. 2 root root 4096 Dec 18 22:43 Videos
-bash-4.3#

-EOF-

SELinux 安全上下文初探 http://www.linuxidc.com/Linux/2014-04/99508.htm

一次由 SELinux 引起的 SSH 公钥认证失败问题 http://www.linuxidc.com/Linux/2013-07/87267.htm

SELinux 入门教程 http://www.linuxidc.com/Linux/2013-04/82371.htm

SELinux 简单配置 http://www.linuxidc.com/Linux/2012-12/77032.htm

CentOS 系统如何快速关闭 SELinux http://www.linuxidc.com/Linux/2012-11/74613.htm

正文完
星哥说事-微信公众号
post-qrcode
 0
星锅
版权声明:本站原创文章,由 星锅 于2022-01-20发表,共计2520字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中