1setfiles(8)                                                        setfiles(8)
2
3
4

NAME

6       setfiles - set file SELinux security contexts.
7
8

SYNOPSIS

10       setfiles  [-c  policy  ]  [-d] [-l] [-n] [-e directory ] [-o filename ]
11       [-q] [-s] [-v] [-vv] [-W] [-F] spec_file pathname...
12

DESCRIPTION

14       This manual page describes the setfiles program.
15
16       This program is primarily used to initialise the security context data‐
17       base (extended attributes) on one or more filesystems.  This program is
18       initially run as part of the SE Linux installation process.
19
20       It can also be run at any time to correct errors, to  add  support  for
21       new  policy,  or  with the -n option it can just check whether the file
22       contexts are all as you expect.
23
24

OPTIONS

26       -c     check the validity of the contexts against the specified  binary
27              policy.
28
29       -d     show what specification matched each file.
30
31       -l     log changes in file labels to syslog.
32
33       -n     don't change any file labels.
34
35       -q     suppress non-error output.
36
37       -r rootpath
38              use an alternate root path
39
40       -e directory
41              directory  to  exclude  (repeat  option for more than one direc‐
42              tory.)
43
44       -F     Force reset of context to match  file_context  for  customizable
45              files
46
47       -o filename
48              save list of files with incorrect context in filename.
49
50       -s     take  a  list  of  files  from standard input instead of using a
51              pathname on the command line.
52
53       -v     show changes in file labels, if type or role are changing.
54
55       -vv    show changes in file labels, if type, role, or user  are  chang‐
56              ing.
57
58       -W     display warnings about entries that had no matching files.
59
60

ARGUMENTS

62       spec_file  The specification file which contains lines of the following
63       form
64       regexp [ -type ] ( context | <<none>> )
65       The regular expression is anchored at both  ends.   The  optional  type
66       field  specifies  the file type as shown in the mode field by the ls(1)
67       program, e.g. -- to match only regular files or -d to match only direc‐
68       tories.   The context can be an ordinary security context or the string
69       <<none>> to specify that the file is not to have its context changed.
70       The last matching specification is used. If  there  are  multiple  hard
71       links  to a file that match different specifications and those specifi‐
72       cations indicate different security contexts, then a  warning  is  dis‐
73       played  but the file is still labeled based on the last matching speci‐
74       fication other than <<none>>.
75
76       pathname...
77              The pathname for the root directory of each file  system  to  be
78              relabeled.  Not used if the -s option is used.
79
80

AUTHOR

82       This man page was written by Russell Coker <russell@coker.com.au>.  The
83       program was written by Stephen Smalley <sds@epoch.ncsc.mil>
84
85

SEE ALSO

87       load_policy(8), checkpolicy(8)
88
89
90
91                                  2002031409                       setfiles(8)
Impressum