Debian Codegraph @

policycoreutils/scripts/fixfiles.8

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