OS Manuals

/usr/bin/setfiles

SELinux policy core utilities

From policycoreutils 3.11-r3 (enterprise-packages), captured 2026-11-08 by running setfiles --help (exit 255). permalink

/usr/bin/setfiles: invalid option -- '-'
usage:  /usr/bin/setfiles [-diIDlmnpqvACEFUWT] [-e excludedir] [-r alt_root_path] [-c policyfile] spec_file pathname...
usage:  /usr/bin/setfiles [-diIDlmnpqvACEFUWT] [-e excludedir] [-r alt_root_path] [-c policyfile] spec_file -f filename
usage:  /usr/bin/setfiles -s [-diIDlmnpqvAFUWT] spec_file
Options (20)
OptionDescriptionSource
-ccheck the validity of the contexts against the specified binary policy.man
-CIf only relabeling errors are encountered during the file tree walks, exit with status 1 rather than 255.man
-dshow what specification matched each file.man
-Etreat conflicting specifications as errors, such as where two hardlinks for the same inode have different contexts.man
-FForce reset of context to match file_context for customizable files, and the default file context, changing the user, role, range portion as well as the type.man
-UIn addition to the type portion also change the user and role portions, but not the range portion.man
-h, -?display usage information and exit.man
-iignore files that do not exist.man
-Iignore digest to force checking of labels even if the stored SHA1 digest matches the specfiles SHA1 digest.man
-DSet or update any directory SHA1 digests.man
-llog changes in file labels to syslog.man
-mdo not read /proc/mounts to obtain a list of non-seclabel mounts to be excluded from relabeling checks.man
-ndon't change any file labels (passive check).man
-pshow progress by printing the number of files in 1k blocks unless relabeling the entire OS, that will then show the approximate percentage complete.man
-qDeprecated and replaced by -v.man
-stake a list of files from standard input instead of using a pathname from the command line (equivalent to “-f -” ).man
-vshow changes in file labels and output any inode association parameters.man
-Wdisplay warnings about entries that had no matching files by outputting the selabel_stats(3) results.man
-0the separator for the input items is assumed to be the null character (instead of the white space).man
-Ado not track inodes with multiple hard links or bind mounts that would match different contexts (saves memory)man
Exit status (2) from the manual page
0it encounters no errors
1the -C option is specified and no other kind of error is encountered
Examples (1) from the manual page, untested

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.