Why does the following “cat” command fail?
Issue
- Why
cat /proc/self/attr/currentreturnsInvalid argumentwhen SELinux is disabled? - With SELinux in
disabledmode gives below output :
[nbk15lk@lrchm00dn01 tmp]$ cat /proc/self/attr/current
cat: /proc/self/attr/current: Invalid argument
[nbk15lk@lrchm00dn01 tmp]$ sestatus
SELinux status: disabled
- When in
enforcingmode gives below output :
[root@rhel6u7-1 ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
[root@rhel6u7-1 ~]# cat /proc/self/attr/current
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
Environment
Red Hat Enterprise Linux 6.7Red Hat Enterprise Linux 7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
