How do i list selinux context on a file?
-
Man page for ls: https://www.lightnetics.com/post/4071
-Z, --context Display security context so it fits on most displays. Displays only mode, user, group, security context and file name.
Shows with and without context information.
$ ls -l /etc/hosts -rw-r--r--. 1 root root 0 Jan 21 12:17 /etc/hosts $ ls -Z /etc/hosts -rw-r--r--. root root system_u:object_r:net_conf_t:s0 /etc/hosts
© Lightnetics 2024