1dea673e9SRodney W. Grimes.\" Copyright (c) 1990, 1991, 1993, 1994 2dea673e9SRodney W. Grimes.\" The Regents of the University of California. All rights reserved. 3dea673e9SRodney W. Grimes.\" 4dea673e9SRodney W. Grimes.\" Redistribution and use in source and binary forms, with or without 5dea673e9SRodney W. Grimes.\" modification, are permitted provided that the following conditions 6dea673e9SRodney W. Grimes.\" are met: 7dea673e9SRodney W. Grimes.\" 1. Redistributions of source code must retain the above copyright 8dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer. 9dea673e9SRodney W. Grimes.\" 2. Redistributions in binary form must reproduce the above copyright 10dea673e9SRodney W. Grimes.\" notice, this list of conditions and the following disclaimer in the 11dea673e9SRodney W. Grimes.\" documentation and/or other materials provided with the distribution. 12dea673e9SRodney W. Grimes.\" 3. All advertising materials mentioning features or use of this software 13dea673e9SRodney W. Grimes.\" must display the following acknowledgement: 14dea673e9SRodney W. Grimes.\" This product includes software developed by the University of 15dea673e9SRodney W. Grimes.\" California, Berkeley and its contributors. 16dea673e9SRodney W. Grimes.\" 4. Neither the name of the University nor the names of its contributors 17dea673e9SRodney W. Grimes.\" may be used to endorse or promote products derived from this software 18dea673e9SRodney W. Grimes.\" without specific prior written permission. 19dea673e9SRodney W. Grimes.\" 20dea673e9SRodney W. Grimes.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21dea673e9SRodney W. Grimes.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22dea673e9SRodney W. Grimes.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23dea673e9SRodney W. Grimes.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24dea673e9SRodney W. Grimes.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25dea673e9SRodney W. Grimes.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26dea673e9SRodney W. Grimes.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27dea673e9SRodney W. Grimes.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28dea673e9SRodney W. Grimes.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29dea673e9SRodney W. Grimes.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30dea673e9SRodney W. Grimes.\" SUCH DAMAGE. 31dea673e9SRodney W. Grimes.\" 32dea673e9SRodney W. Grimes.\" @(#)chown.8 8.3 (Berkeley) 3/31/94 33dea673e9SRodney W. Grimes.\" 34dea673e9SRodney W. Grimes.Dd March 31, 1994 35dea673e9SRodney W. Grimes.Dt CHOWN 8 36dea673e9SRodney W. Grimes.Os BSD 4 37dea673e9SRodney W. Grimes.Sh NAME 38dea673e9SRodney W. Grimes.Nm chown 39dea673e9SRodney W. Grimes.Nd change file owner and group 40dea673e9SRodney W. Grimes.Sh SYNOPSIS 41dea673e9SRodney W. Grimes.Nm chown 42dea673e9SRodney W. Grimes.Oo 43dea673e9SRodney W. Grimes.Fl R 44dea673e9SRodney W. Grimes.Op Fl H | Fl L | Fl P 45dea673e9SRodney W. Grimes.Oc 46dea673e9SRodney W. Grimes.Op Fl f 47dea673e9SRodney W. Grimes.Ar owner Op Ar :group 48dea673e9SRodney W. Grimes.Ar file ... 49dea673e9SRodney W. Grimes.Nm chown 50dea673e9SRodney W. Grimes.Oo 51dea673e9SRodney W. Grimes.Fl R 52dea673e9SRodney W. Grimes.Op Fl H | Fl L | Fl P 53dea673e9SRodney W. Grimes.Oc 54dea673e9SRodney W. Grimes.Op Fl f 55dea673e9SRodney W. Grimes.Ar :group 56dea673e9SRodney W. Grimes.Ar file ... 57dea673e9SRodney W. Grimes.Sh DESCRIPTION 58dea673e9SRodney W. Grimes.Nm Chown 59dea673e9SRodney W. Grimessets the user ID and/or the group ID of the specified files. 60dea673e9SRodney W. Grimes.Pp 61dea673e9SRodney W. GrimesThe options are as follows: 62dea673e9SRodney W. Grimes.Bl -tag -width Ds 63dea673e9SRodney W. Grimes.It Fl H 64dea673e9SRodney W. GrimesIf the 65dea673e9SRodney W. Grimes.Fl R 66dea673e9SRodney W. Grimesoption is specified, symbolic links on the command line are followed. 67dea673e9SRodney W. Grimes(Symbolic links encountered in the tree traversal are not followed.) 68dea673e9SRodney W. Grimes.It Fl L 69dea673e9SRodney W. GrimesIf the 70dea673e9SRodney W. Grimes.Fl R 71dea673e9SRodney W. Grimesoption is specified, all symbolic links are followed. 72dea673e9SRodney W. Grimes.It Fl P 73dea673e9SRodney W. GrimesIf the 74dea673e9SRodney W. Grimes.Fl R 75dea673e9SRodney W. Grimesoption is specified, no symbolic links are followed. 76dea673e9SRodney W. Grimes.It Fl R 77dea673e9SRodney W. GrimesChange the user ID and/or the group ID for the file hierarchies rooted 78dea673e9SRodney W. Grimesin the files instead of just the files themselves. 79dea673e9SRodney W. Grimes.It Fl f 80dea673e9SRodney W. GrimesDon't report any failure to change file owner or group, nor modify 81dea673e9SRodney W. Grimesthe exit status to reflect such failures. 82dea673e9SRodney W. Grimes.El 83dea673e9SRodney W. Grimes.Pp 84dea673e9SRodney W. GrimesSymbolic links don't have owners, so unless the 85dea673e9SRodney W. Grimes.Fl H 86dea673e9SRodney W. Grimesor 87dea673e9SRodney W. Grimes.Fl L 88dea673e9SRodney W. Grimesoption is set, 89dea673e9SRodney W. Grimes.Nm chown 90dea673e9SRodney W. Grimeson a symbolic link always succeeds and has no effect. 91dea673e9SRodney W. GrimesThe 92dea673e9SRodney W. Grimes.Fl H , 93dea673e9SRodney W. Grimes.Fl L 94dea673e9SRodney W. Grimesand 95dea673e9SRodney W. Grimes.Fl P 96dea673e9SRodney W. Grimesoptions are ignored unless the 97dea673e9SRodney W. Grimes.Fl R 98dea673e9SRodney W. Grimesoption is specified. 99dea673e9SRodney W. GrimesIn addition, these options override each other and the 100dea673e9SRodney W. Grimescommand's actions are determined by the last one specified. 101dea673e9SRodney W. Grimes.Pp 102dea673e9SRodney W. GrimesThe 103dea673e9SRodney W. Grimes.Ar owner 104dea673e9SRodney W. Grimesand 105dea673e9SRodney W. Grimes.Ar group 106dea673e9SRodney W. Grimesoperands are both optional, however, one must be specified. 107dea673e9SRodney W. GrimesIf the 108dea673e9SRodney W. Grimes.Ar group 109dea673e9SRodney W. Grimesoperand is specified, it must be preceded by a colon (``:'') character. 110dea673e9SRodney W. Grimes.Pp 111dea673e9SRodney W. GrimesThe 112dea673e9SRodney W. Grimes.Ar owner 113dea673e9SRodney W. Grimesmay be either a numeric user ID or a user name. 114dea673e9SRodney W. GrimesIf a user name is also a numeric user ID, the operand is used as a 115dea673e9SRodney W. Grimesuser name. 116dea673e9SRodney W. GrimesThe 117dea673e9SRodney W. Grimes.Ar group 118dea673e9SRodney W. Grimesmay be either a numeric group ID or a group name. 119dea673e9SRodney W. GrimesIf a group name is also a numeric group ID, the operand is used as a 120dea673e9SRodney W. Grimesgroup name. 121dea673e9SRodney W. Grimes.Pp 122dea673e9SRodney W. GrimesThe ownership of a file may only be altered by a super-user for 123dea673e9SRodney W. Grimesobvious security reasons. 124dea673e9SRodney W. Grimes.Pp 125dea673e9SRodney W. GrimesThe 126dea673e9SRodney W. Grimes.Nm chown 127dea673e9SRodney W. Grimesutility exits 0 on success, and >0 if an error occurs. 128dea673e9SRodney W. Grimes.Sh COMPATIBILITY 129dea673e9SRodney W. GrimesPrevious versions of the 130dea673e9SRodney W. Grimes.Nm chown 131dea673e9SRodney W. Grimesutility used the dot (``.'') character to distinguish the group name. 132dea673e9SRodney W. GrimesThis has been changed to be a colon (``:'') character so that user and 133dea673e9SRodney W. Grimesgroup names may contain the dot character. 134dea673e9SRodney W. Grimes.Pp 135dea673e9SRodney W. GrimesPrevious versions of the 136dea673e9SRodney W. Grimes.Nm chown 137dea673e9SRodney W. Grimesutility changed the owner of symbolic links specified on the command 138dea673e9SRodney W. Grimesline. 139dea673e9SRodney W. GrimesIn this system, symbolic links do not have owners. 140dea673e9SRodney W. Grimes.Sh SEE ALSO 141dea673e9SRodney W. Grimes.Xr chgrp 1 , 142dea673e9SRodney W. Grimes.Xr find 1 , 143dea673e9SRodney W. Grimes.Xr chown 2 , 144dea673e9SRodney W. Grimes.Xr fts 3 , 145dea673e9SRodney W. Grimes.Xr symlink 7 146dea673e9SRodney W. Grimes.Sh STANDARDS 147dea673e9SRodney W. GrimesThe 148dea673e9SRodney W. Grimes.Nm chown 149dea673e9SRodney W. Grimescommand is expected to be POSIX 1003.2 compliant. 150