1fixfiles(8) fixfiles(8)
2
3
4
6 fixfiles - fix file SELinux security contexts.
7
8
10 fixfiles [-v] [-F] [-B] [ -N time ] [-l logfile ] { check |
11 restore|[-f] relabel | verify } [[dir/file] ... ]
12
13 fixfiles [-v] [-F] [ -R rpmpackagename[,rpmpackagename...] ] [-l log‐
14 file ] { check | restore | verify }
15
16 fixfiles [-v] [-F] -C PREVIOUS_FILECONTEXT [-l logfile ] { check |
17 restore | verify }
18
19 fixfiles [-F] [-B] onboot
20
21
23 This manual page describes the fixfiles script.
24
25 This script is primarily used to correct the security context database
26 (extended attributes) on filesystems.
27
28 It can also be run at any time to relabel when adding support for new
29 policy, or just check whether the file contexts are all as you expect.
30 By default it will relabel all mounted ext2, ext3, xfs and jfs file
31 systems as long as they do not have a security context mount option.
32 You can use the -R flag to use rpmpackages as an alternative. The file
33 /etc/selinux/fixfiles_exclude_dirs can contain a list of directories
34 excluded from relabeling.
35
36 fixfiles onboot will setup the machine to relabel on the next reboot.
37
38
40 -B If specified with onboot, this fixfiles will record the current
41 date in the /.autorelabel file, so that it can be used later to
42 speed up labeling. If used with restore, the restore will only
43 affect files that were modified today.
44
45 -l logfile
46 Save the output to the specified logfile
47
48 -F Force reset of context to match file_context for customizable
49 files
50
51
52 -f Clear /tmp directory with out prompt for removal.
53
54
55 -R rpmpackagename[,rpmpackagename...]
56 Use the rpm database to discover all files within the specified
57 packages and restore the file contexts. (-a will get all files
58 in the RPM database).
59
60 -C PREVIOUS_FILECONTEXT
61 Run a diff on the PREVIOUS_FILECONTEXT file to the currently
62 installed one, and restore the context of all affected files.
63
64
65 -N time
66 Only act on files created after the specified date. Date must
67 be specified in "YYYY-MM-DD HH:MM" format. Date field will be
68 passed to find --newermt command.
69
70
71 -v Modify verbosity from progress to verbose. (Run restorecon with
72 -v instead of -p)
73
74
76 One of:
77
78 check print any incorrect file context labels, showing old and new
79 context, but do not change them.
80
81 restore
82 change any incorrect file context labels.
83
84 relabel
85 Prompt for removal of contents of /tmp directory and then change
86 any incorrect file context labels to match the install file_con‐
87 texts file.
88
89 verify List out files with incorrect file context labels, but do not
90 change them.
91
92 [[dir/file] ... ]
93 List of files or directories trees that you wish to check file
94 context on.
95
96
98 This man page was written by Richard Hally <rhally@mindspring.com>.
99 The script was written by Dan Walsh <dwalsh@redhat.com>
100
101
103 setfiles(8),restorecon(8)
104
105
106
107
108 2002031409 fixfiles(8)