---
name: "fchsidfs"
section: "2"
platform: "linux"
package: "libselinux-dev"
version: "2002031409-4"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/chsidfs"
---

# fchsidfs(2)

change SID of a file system

Part of [chsidfs(2)](/chsidfs/2.md).

## NAME

chsidfs, fchsidfs - change SID of a file system

## SYNOPSIS

**int chsidfs(const char \****path***, security\_id\_t** *fs\_sid***, security\_id\_t** *f\_sid***);**\
 **int fchsidfs(int** *fd***, security\_id\_t** *fs\_sid***, security\_id\_t** *f\_sid***);**

## DESCRIPTION

The **chsidfs**  and  **fchsidfs** calls may be used to change the SID of a file system using the  *fs\_sid* parameter and/or the SID to use for unlabeled files using the *f\_sid* parameter.  Either SID parameter may be null, in which case the corresponding SID will not be changed.

## RETURN VALUE

On success, zero is returned.  On error, -1 is returned, and *errno* is set appropriately.

## SEE ALSO

**statfs\_secure**(2), **fstatfs\_secure**(2)
