msa
msa

Reputation: 31

Read the extended attributes for a file in SELinux

I want to read the capabilities of a file in linux.

I want answer something like this with complete details...

/path/to/file: uid:0 gid:2000 mode:100750 capability:40 selinux:u:object_r:runas_exec:s0
0x40 = 64 decimal

I tried ls -l, getfattr, xattr but nothing worked...

After applying the selinux attribute values, how can i read it?

Please help

Upvotes: 1

Views: 1378

Answers (1)

Navneet
Navneet

Reputation: 91

Have you tried ls with -Z option.

In SE Linux many of the common commands(eg ls, cp, mv) have been modified to include options (eg. -Z) to display the information related to SE Linux.

Upvotes: 3

Related Questions