1restorecon(8)                                                    restorecon(8)
2
3
4

NAME

6       restorecon - restore file(s) default SELinux security contexts.
7
8

SYNOPSIS

10       restorecon  [-o outfilename ] [-R] [-n] [-p] [-v] [-e directory ] path‐
11       name...
12
13       restorecon -f infilename [-o outfilename ] [-e directory  ]  [-R]  [-n]
14       [-p] [-v] [-F]
15
16

DESCRIPTION

18       This manual page describes the restorecon program.
19
20       This  program  is  primarily  used to reset the security context (type)
21       (extended attributes) on one or more files.
22
23       It can be run at any time to correct errors, to  add  support  for  new
24       policy,  or  with the -n option it can just check whether the file con‐
25       texts are all as you expect.
26
27       If a file object does not have a context,  restorecon  will  write  the
28       default  context  to  the  file object's extended attributes. If a file
29       object has a context, restorecon will only modify the type  portion  of
30       the  security  context.   The -F option will force a replacement of the
31       entire context.
32
33

OPTIONS

35       -i     ignore files that do not exist
36
37       -f infilename
38              infilename contains a list of files to be processed by  applica‐
39              tion. Use - for stdin.
40
41       -e directory
42              directory  to  exclude  (repeat  option for more than one direc‐
43              tory.)
44
45       -R -r  change files and directories file labels recursively
46
47       -n     don't change any file labels.
48
49       -o outfilename
50              save list of files with incorrect context in outfilename.
51
52       -p     show progress by printing * every 1000 files.
53
54       -v     show changes in file labels.
55
56       -F     Force reset of context to match  file_context  for  customizable
57              files,  and  the  default file context, changing the user, role,
58              range portion as well as the type.
59
60
61       ARGUMENTS
62              pathname...  The pathname for the file(s) to be relabeled.
63

NOTE

65       restorecon does not follow symbolic links.
66
67

AUTHOR

69       This man page was written by Dan Walsh  <dwalsh@redhat.com>.   Some  of
70       the content of this man page was taken from the setfiles man page writ‐
71       ten by Russell Coker <russell@coker.com.au>.  The program  was  written
72       by Dan Walsh <dwalsh@redhat.com>.
73
74

SEE ALSO

76       load_policy(8), checkpolicy(8) setfiles(8)
77
78
79
80                                  2002031409                     restorecon(8)
Impressum