I have an application trying to read files in a directory in a Linux Env. My directory permission is 'drwxrwxrwx' but the app doesn't have access to the files under this directory. However, when I move the files to another directory with 'drwxrwxrwx.' it works properly. I did my searches, can anyone explain what is that '.' at the end of permissions and how does it work?
Asked
Active
Viewed 75 times
0
-
Related but not a duplicate Understanding UNIX permissions and file types – Chris Davies Aug 21 '20 at 19:47
1 Answers
3
GNU ls
uses a .
character to indicate a file has a SELinux security context, but no other alternate access method.
To view a file's SELinux context, invoke ls
with the Z
option. For example:
# ls -alZ /etc/passwd /etc/shadow
-rw-r--r--. 1 root root system_u:object_r:passwd_file_t:s0 2490 Oct 28 2019 /etc/passwd
----------. 1 root root system_u:object_r:shadow_t:s0 1319 Aug 21 14:02 /etc/shadow
#
By the way, a file with any other combination of alternate access methods such as file ACLs is marked with a +
character.

fpmurphy
- 4,636