36

I performed an ls -la on directory on my CentOS 6.4 server here and the permissions for a given file came out as:

-rwxr-xr-x.

I understand what -rwxr-xr-x means, what I don't understand is the . after the last attribute.

Can someone explain it to me? Is it harmful in any way? Can it be removed?

0

2 Answers 2

34

GNU ls uses a . character to indicate a file with an SELinux security context, but no other alternate access method.

-- From ls man page (info coreutils 'ls invocation').

3
3

To see the actual security context applied to the file run this:

ls -Z

The security contexts can be assigned to a file even having SELinux disabled. You can check your security context with this:

id -Z

If SELinux is disabled you will get this message:

id: --context (-Z) works only on an SELinux-enabled kernel

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .