1.\" Copyright (c) 1989, 1990, 1993, 1994 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 |
36.\" $FreeBSD: head/bin/chmod/chmod.1 107230 2002-11-25 14:18:42Z ru $ |
37.\" 38.Dd March 31, 1994 39.Dt CHMOD 1 40.Os 41.Sh NAME 42.Nm chmod 43.Nd change file modes 44.Sh SYNOPSIS --- 6 unchanged lines hidden (view full) --- 51The 52.Nm 53utility modifies the file mode bits of the listed files 54as specified by the 55.Ar mode 56operand. 57.Pp 58The options are as follows: |
59.Bl -tag -width indent 60.It Fl f 61Do not display a diagnostic message if 62.Nm 63could not modify the mode for 64.Va file , 65nor modify the exit status to reflect such failures. |
66.It Fl H 67If the 68.Fl R 69option is specified, symbolic links on the command line are followed. 70(Symbolic links encountered in the tree traversal are not followed by 71default.) |
72.It Fl h 73If the file is a symbolic link, change the mode of the link itself 74rather than the file that the link points to. |
75.It Fl L 76If the 77.Fl R 78option is specified, all symbolic links are followed. 79.It Fl P 80If the 81.Fl R 82option is specified, no symbolic links are followed. 83This is the default. 84.It Fl R 85Change the modes of the file hierarchies rooted in the files 86instead of just the files themselves. |
87.It Fl v 88Cause 89.Nm 90to be verbose, showing filenames as the mode is modified. 91If the 92.Fl v 93flag is specified more than once, the old and new modes of the file 94will also be printed, in both octal and symbolic notation. --- 16 unchanged lines hidden (view full) --- 111.Ex -std 112.Sh MODES 113Modes may be absolute or symbolic. 114An absolute mode is an octal number constructed from the sum of 115one or more of the following values: 116.Pp 117.Bl -tag -width 6n -compact -offset indent 118.It Li 4000 |
119(the setuid bit). 120Executable files with this bit set |
121will run with effective uid set to the uid of the file owner. |
122Directories with this bit set will force all files and |
123sub-directories created in them to be owned by the directory owner 124and not by the uid of the creating process, if the underlying file 125system supports this feature: see 126.Xr chmod 2 127and the |
128.Cm suiddir |
129option to 130.Xr mount 8 . 131.It Li 2000 |
132(the setgid bit). 133Executable files with this bit set |
134will run with effective gid set to the gid of the file owner. 135.It Li 1000 |
136(the sticky bit). |
137See 138.Xr chmod 2 139and 140.Xr sticky 8 . 141.It Li 0400 142Allow read by owner. 143.It Li 0200 144Allow write by owner. --- 201 unchanged lines hidden --- |