32

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
32

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
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.