1fixfiles(8) fixfiles(8)
2
3
4
6 fixfiles - fix file SELinux security contexts.
7
8
10 fixfiles [-F] [ -R rpmpackagename[,rpmpackagename...] ] [ -C PREVI‐
11 OUS_FILECONTEXT ] [-l logfile ] [-o outputfile ] { check | restore |
12 [-F] relabel | verify }"
13
14 fixfiles [-F] [-l logfile ] [-o outputfile ] { check | restore|[-f]
15 relabel | verify } [[dir/file] ... ]
16
17
19 This manual page describes the fixfiles script.
20
21 This script is primarily used to correct the security context database
22 (extended attributes) on filesystems.
23
24 It can also be run at any time to relabel when adding support for new
25 policy, or just check whether the file contexts are all as you expect.
26 By default it will relabel all mounted ext2, ext3, xfs and jfs file
27 systems as long as they do not have a security context mount option.
28 You can use the -R flag to use rpmpackages as an alternative.
29
30
32 -l logfile
33 Save the output to the specified logfile
34
35 -o outputfile
36 Save all files that have file_context that differs from the
37 default, in outputfile.
38
39
40 -F Force reset of context to match file_context for customizable
41 files
42
43
44 -f Don't prompt for removal of /tmp directory.
45
46
47 -R rpmpackagename[,rpmpackagename...]
48 Use the rpm database to discover all files within the specified
49 packages and restore the file contexts. (-a will get all files
50 in the RPM database).
51
52 -C PREVIOUS_FILECONTEXT
53 Run a diff on the PREVIOUS_FILECONTEXT file to the currently
54 installed one, and restore the context of all affected files.
55
56
58 One of:
59
60 check print any incorrect file context labels, showing old and new
61 context, but do not change them.
62
63 restore
64 change any incorrect file context labels.
65
66 relabel
67 Prompt for removal of contents of /tmp directory and then change
68 any incorrect file context labels to match the install file_con‐
69 texts file.
70
71 verify List out files with incorrect file context labels, but do not
72 change them.
73
74 [[dir/file] ... ]
75 List of files or directories trees that you wish to check file
76 context on.
77
78
80 This man page was written by Richard Hally <rhally@mindspring.com>.
81 The script was written by Dan Walsh <dwalsh@redhat.com>
82
83
85 setfiles(8),restorecon(8)
86
87
88
89
90 2002031409 fixfiles(8)