.\" $HeadURL$ $LastChangedRevision$ .\" .pso ade-config --format=man .so \*[ade_include_prefix]/ade.man .pso fad-config --format=man .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 \*[ade_standard_synopsis_component] [ .B \-n | .B \-\-simulate ] .I perm\-file .I filelist\-file .br .ne 5 .SH DESCRIPTION .B Fadfixperms sets the permission of list of files and directories read from .I filelist\-file according to the rules specified in .I perm\-file\fR. .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. 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 (positions 4\-6) and others (positions 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. .PP The first match wins. .ne 5 .SH OPTIONS \*[ade_standard_options_component] .TP .B \-n\fR, \fB\-\-simulate .B Fadfixperms displays the equivalent Unix commands to make the required changes, but does not actually change anything. .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 to 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 .B 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 only execute permission is granted to the group and others on the assumption that the pattern that matches the intermediate directories will take care of granting any other permissions. If there is no such pattern then the group and others are granted both execute and read permissions. .PP .B Fadfixperms does not follow symlinks. If you make extensive use of symlinks, then things can get very confusing. .B Fadfixperms does not attempt to change the permissions of symlinks themselves. .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 \*[ade_standard_copyright_component]