5.7. The file_t and default_t Types
When using a file system that supports extended attributes (EA), the
file_t
type is the default type for files that have not been assigned an EA value. This type is only used for this purpose and does not exist on correctly labeled file systems, because all files on a system running SELinux should have a proper SELinux context, and the file_t
type is never used in file-context configuration[8].
The
default_t
type is used on files that do not match any pattern in file-context configuration, so that such files can be distinguished from files that do not have a context on disk, and generally are kept inaccessible to confined domains. For example, if you create a new top-level directory, such as /mydirectory/
, this directory may be labeled with the default_t
type. If services need access to this directory, you need to update the file-context configuration for this location. See Section 5.6.2, “Persistent Changes: semanage fcontext” for details on adding a context to the file-context configuration.
[8]
Files in the
/etc/selinux/targeted/contexts/files/
directory define contexts for files and directories. Files in this directory are read by the restorecon
and setfiles
utilities to restore files and directories to their default contexts.