---
name: "selinux_lsetfilecon_default"
section: "3"
platform: "linux"
package: "libselinux1-dev"
version: "3.8.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/selinux_lsetfilecon_default"
---

# selinux\_lsetfilecon\_default(3)

set the file context to the system defaults

## NAME

selinux\_lsetfilecon\_default - set the file context to the system defaults

## SYNOPSIS

**#include \<selinux/selinux.h\>**

**int selinux\_lsetfilecon\_default(const char \****path***);**

## DESCRIPTION

**selinux\_lsetfilecon\_default**() sets the file context to the system defaults.

## RETURN VALUE

Returns zero on success or -1 otherwise.

## SEE ALSO

[**selinux**(8)](/selinux/8.md), [**selinux\_file\_context\_cmp**(3)](/selinux_file_context_cmp/3.md), [**selinux\_file\_context\_verify**(3)](/selinux_file_context_verify/3.md), [**matchpathcon**(3)](/matchpathcon/3.md), [**freecon**(3)](/freecon/3.md), [**setfilecon**(3)](/setfilecon/3.md), [**setfscreatecon**(3)](/setfscreatecon/3.md)
