108
23
Some of the files in my directories under Linux have a .
at the end of the permissions listing.
- What does the dot mean at the end of
-rw-r--r--
? - How do you set it with
chmod
?
108
23
Some of the files in my directories under Linux have a .
at the end of the permissions listing.
-rw-r--r--
? chmod
?111
According to ls.c
(line 3785), .
means an SELinux ACL. (+
means a general ACL.)
39
I had the same question. It took me a while to find this, having browsed the "man ls" page a hundred times (well, maybe not that often) until I finally saw the note in the SEE ALSO section about using the command:
info coreutils 'ls invocation'
In the section describing "-l" (--format=long):
Following the file mode bits is a single character that specifies
whether an alternate access method such as an access control list
applies to the file. When the character following the file mode
bits is a space, there is no alternate access method. When it is
a printing character, then there is such a method.
GNU `ls' uses a `.' character to indicate a file with an SELinux
security context, but no other alternate access method.
A file with any other combination of alternate access methods is
marked with a `+' character.
13
This is SELinux context. Try ls -Z /your/file
Quoting my man ls
SELinux options: --lcontext Display security context. Enable -l. Lines will probably be too wide for most displays. -Z, --context Display security context so it fits on most displays. Displays only mode, user, group, security context and file name. --scontext Display only security context and file name.
To change this, try one of these commands: chcon
or semanage fcontext
or restorecon
Quite neatly explained here: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Security-Enhanced_Linux/sect-Security-Enhanced_Linux-Working_with_SELinux-SELinux_Contexts_Labeling_Files.html
11
It means the file has an access list with SELinux. Check out this topic, it tells you how to allow you to edit/change the file http://ubuntuforums.org/showthread.php?t=1315684
2
Most likely this is due to an Access Control List (ACL) although I've only seen them shown as a +
as in rw-rw-rw-+
. Perhaps the .
means a lack of an ACL on that file.
You can try typing getfacl .
in the current directory to see what access controls those files might have.
3Nope, the dot doesn't mean lack of ACLs - see other answers – Linker3000 – 2011-01-08T10:55:51.163
This does not work for me – Josef Klimuk – 2018-08-07T14:02:28.517