.\" $HeadURL$ $LastChangedRevision$ .\" .TH FADFIXPERMS 1 "27 December 2002" .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 .I level ] [ .B \-h | .B \-\-help ] [ .B \-p | .B \-\-list\-paths ] [ .B \-n | .B \-\-simulate ] [ .B \-u | .B \-\-group\-is\-user ] [ .B \-o | .B \-\-group\-is\-other ] .I cfgfile .br .ne 5 .SH DESCRIPTION This page documents version SPPSYM_RELEASEID of .B fadfixperms\fR. .PP .B Fadfixperms sets the permission of a hierarchy of files and directories according to the rules specified in a configuration file. .br .ne 5 .SH CONFIGURATION The configuration file, which is the only required argument consists of blank and hash-led lines, which are ignored, root path specifiers and permission specifiers. .PP The root specifiers are of the form: .IP "" 5 .B r \fIrootdir .PP which indicates that files and directories under .I rootdir should have their permissions fixed. Multiple .B r entries are permitted. .PP The permission specifiers are of the form: .IP "" 5 .I pattern readchar writechar execchar .PP Files and directories which match .I pattern will have the permissions for others changed according to .I readchar\fR, .I writechar and .I execchar\fR. .I pattern is a perl regular expression (see .B perlre\fR(1)). It is the first match which is used. .PP .I readchar maybe one of the following characters: .RS 5 .TP 5 .B r others can read the file or directory .TP .B \- others cannot read the file or directory .TP .B c others can read the file or directory if and only if the owner can; i.e. the permission is copied from the owner, whatever that might be. .RE .PP Similarly for .I writechar\fR: .RS 5 .TP .B w others can write to the file, or if it is a directory, they can create and delete files in it .TP .B \- others cannot write to the file, or if it is a directory, they cannot create or delete files in it .TP .B c the permission is copied from ther owner, whatever that might be. .RE .PP and for .I exechar\fR: .RS 5 .TP .B x others can execute the file, or if it is a directory, they can enter it .TP .B \- others cannot execute the file, or if it is a directory, they cannot enter it .TP .B c the permission is copied from ther owner, whatever that might be. .RE .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 \-u \fR,\fB \-\-group-is-user The group permissions will be set the the same as the owner's permissions. This is suitable for systems on which each user has their own group. .TP .B \-o \fR,\fB \-\-group-is-other The group permissions will be set the the same as the other's permissions, which are determined by the configuration file. This is suitable for systems on which users are in a common group. This is the default behaviour. .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 The following configuration would allow other users access to user fbloggs's \(oqwork' directory, while keeping everything else private: .IP .nf .fam C r /home/fbloggs c-c .*/work(|/.*) --- .* .fam T .fi .PP Alternatively, the following would keep the directory \(oqmail' private, while opening everything else up: .IP .nf .fam C r /home/fbloggs --- .*/mail(|/.*) c-c .* .fam T .fi .PP .br .ne 5 .SH CAVEATS When a file is to be made accessible to others, there is an implied requirement to make the directories between the root (specified in the configuration file) and it readable and executable too. .PP .B Fadfixperms ignores symlinks. If you make extensive use of symlinks, then things can get very confusing. .br .ne 5 .SH SEE ALSO perlre(1) .br .ne 5 .SH AUTHOR SPPSYM_AUTHOR_NAME .br .ne 5 .SH COPYRIGHT & DISTRIBUTION POLICY Copyright (C) 2002-2002 SPPSYM_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.