.\" $HeadURL$ $LastChangedRevision$ .\" .TH FADFIXPERMS 1 "ADE_APP_TOKEN_RELEASE_DATE_MAN" .ne 5 .SH NAME fadfixperms \- Fix the permissions of a set of files .br .ne 5 .SH SYNOPSIS .B fadfixperms [ .B \-V | .B \-\-version ] [ .B \-v | .B \-\-verbose | .B \-d .I level | .B \-\-debug=\fIlevel ] [ .B \-h | .B \-\-help ] [ .B \-p | .B \-\-list\-paths ] [ .B \-n | .B \-\-simulate ] .I perm\-file .I filelist\-file .br .ne 5 .SH DESCRIPTION .B Fadfixperms sets the permission of a list of files and directories read from a file according to the rules specified in a configuration file. .B Two arguments are required. .I perm\-file is a file specifying what files should be set to what permissions (see .B CONFIGURATION below). .I filelist\-file specifies the list of files whose permissions should be checked and possibly modified. .br .ne 5 .SH CONFIGURATION The file specified by .I perm\-file consists of blank and hash-led lines, which are ignored and permission specifiers. .PP The permission specifiers are of the form: .IP "" 5 .I permission owner group pattern .PP Files and directories which match .I pattern (according to .B perlre\fR(1)) will have their owner and group changed to .I owner and .I group\fR, and their permissions changed according to .I permission\fR. In turn, .I permission is a sequence of nine characters representing the read, write and execute permissions for the file's owner and the file's group (giving nine characters for all combinations, just as is displayed by .B ls\fR(1)) with the .B \-l option. The characters may be: .RS 5 .TP 5 .B r the individual read permission addressed by the position of this character (position 1 for the owner, position 4 for the group, position 7 for others) will be set on. .TP .B w the individual write permission addressed by the position of this character (position 2 for the owner, position 5 for the group, position 8 for others) will be set on. .TP .B x\fR, \fBs\fR, \fBt\fR, \fBS\fR, \fBT\fR the individual execute permission addressed by the position of this character (position 3 for the owner, position 6 for the group, position 9 for others) will be set on. .TP .B \- the individual permission addressed by the position of this character will not be set. .TP .B c the individual permission addressed by the position of this character will be copied from the corresponding permission for the owner of the file. This character is only valid in positions for the group (4-6) and others (7-9) .TP .B ! the individual permission addressed by the position of this character will not be changed from its current value. .RE .PP .I owner and .I group may be valid login or group names, or .B !\fR, which means that the owner or group will not be changed. .ne 5 .SH OPTIONS .TP 25 .B \-d \fIlevel\fR, \fB\-\-debug=\fIlevel\fR Determines how verbose .B fadfixperms will be. The message types displayed for the different values of .I level are as follows: .RS 25 .TP 5 .B 0 internal errors only .TP .B 1 internal errors and normal errors .TP .B 2 internal errors, normal errors and warnings .TP .B 3 internal errors, normal errors, warnings and informational messages .TP .B >3 all the above plus application-specific debug messages. .RE .TP .B \-h\fR, \fB\-\-help Displays a brief usage message. .TP .B \-n\fR, \fB\-\-simulate .B Fadfixperms displays the actions it would take but does not do anything. .TP .B \-p\fR, \fB\-\-list\-paths List the compiled-in paths of various files and directories that .B fadfixperms uses. .TP .B \-v\fR, \fB\-\-verbose Equivalent to .B \-d 3\fR. .TP .B \-V\fR, \fB\-\-version Print the program's version number and exit. .br .ne 5 .SH EXIT STATUS On success .B fadfixperms returns zero. On failure it returns non-zero and displays a diagnostic message. .br .ne 5 .SH FILES None. .br .ne 5 .SH ENVIRONMENT VARIABLES None. .br .ne 5 .SH EXAMPLES With the following in /home/fbloggs/etc/fadfixperms.conf, the user Fred bloggs would allow other users access his \(oqwork' directory, while keeping everything else private: .IP .nf .fam C !!!c-cc-c ! ! .*/work(|/.*) !!!------ ! ! .* .fam T .fi .PP Alternatively, the following would keep the directory \(oqmail' private, while opening everything else up: .IP .nf .fam C !!!------ ! ! .*/mail(|/.*) !!!c-cc-c ! ! .* .fam T .fi .PP In both cases, the command to run to check and possibly correct the permissions would be: .IP .nf .fam C find /home/fbloggs | fadfixperms /home/fbloggs/etc/fadfixperms.conf - .fam T .fi .br .ne 5 .SH CAVEATS When a file is to be made accessible to the group or others, there is an implied requirement to make all parent directories accessible (although to a more limited extent). If there is a pattern provided which matches any of these intermediate directories, then they are granted execute permission only. If there is no such pattern then they are granted read and execute permission. .PP .B Fadfixperms does not follow symlinks. If you make extensive use of symlinks, then things can get very confusing. .PP .B Fadfixperms does not attempt to change the permissions of symlinks themselves. Depending on the filesystem type, to not do so may be a bug. .br .ne 5 .SH STANDARDS This manual page documents version ADE_APP_TOKEN_RELEASE_ID of .B fadfixperms\fR. .br .ne 5 .SH SEE ALSO ls(1), perlre(1), fad-config(1) .br .ne 5 .SH AUTHOR ADE_APP_TOKEN_AUTHOR_NAME .br .ne 5 .SH COPYRIGHT & DISTRIBUTION POLICY Copyright (C) 2002-ADE_APP_TOKEN_RELEASE_YEAR ADE_APP_TOKEN_AUTHOR_NAME .PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .PP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .PP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.