Why is id command showing euid and egid in output?

Solution Verified - Updated -

Issue

  • Commands like touch/mkdir are creating files with root ownership for non-root users.
  • Why is id command showing euid and egid in output?
[test@localhost ~]$ pwd
/home/test
[test@localhost ~]$ whoami
test
[test@localhost ~]$ id
uid=1072(test) gid=1072(test) euid=0(root) egid=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[test@localhost ~]$ mkdir testing
[test@localhost ~]$ ll
drwxrwxr-x. 2 root   root     6 Sep 30 09:20 testing

Environment

  • 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