Why does the following “cat” command fail?

Solution Verified - Updated -

Issue

  • Why cat /proc/self/attr/current returns Invalid argument when SELinux is disabled?
  • With SELinux in disabled mode 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 enforcing mode 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.7
  • Red Hat Enterprise Linux 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content