Path: blob/main/documentation/manual-pages/ja/man1/chmod.1
18093 views
.\" Copyright (c) 1989, 1990, 1993, 1994 .\" The Regents of the University of California. All rights reserved. .\" .\" This code is derived from software contributed to Berkeley by .\" the Institute of Electrical and Electronics Engineers, Inc. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#)chmod.1 8.4 (Berkeley) 3/31/94 .\" %FreeBSD: src/bin/chmod/chmod.1,v 1.36 2004/04/06 20:06:44 markm Exp % .\" .\" $FreeBSD$ .Dd March 31, 1994 .Dt CHMOD 1 .Os .Sh ̾�� .Nm chmod .Nd �ե�����Υ⡼�ɤ��ѹ����� .Sh �� .Nm chmod .Op Fl fhv .Op Fl R Op Fl H | L | P .Ar mode .Ar .Sh ���� .Nm �ϻ��ꤵ�줿�ե�����Υ⡼�ɤ� .Ar mode �ǻ��ꤷ����Τ��ѹ����ޤ��� .Pp ���ץ����Ȥ��ưʲ��Τ�Τ�����ޤ�: .Bl -tag -width indent .It Fl f .Nm �� .Va file �Υ⡼�ɤ��ѹ��Ǥ��ʤ��ä��Ȥ��ˡ����ǥ�å�������ɽ�����ޤ��� ���Ԥ���λ�ͤ��ѹ���Ԥ��ޤ��� .It Fl H .Fl R ���ץ�����ꤵ��Ƥ���С�����������ܥ�å���ΤȤ�������� ���ɤä��ѹ����ޤ��� (�ǥ��쥯�ȥ�ĥõ����˸��Ĥ��ä�����ܥ�å���ϡ��ǥե���ȤǤ� ����ʾ����פ��ޤ���) .It Fl h �ե����뤬����ܥ�å���ξ�硢 �����Υե���������˥���ȤΥ⡼�ɤ��ѹ����ޤ��� .It Fl L .Fl R ���ץ�����ꤵ��Ƥ���С����٤ƤΥ���ܥ�å���ɤꡢ �����Υե�������ѹ����ޤ��� .It Fl P .Fl R ���ץ�����ꤵ��Ƥ��Ƥ⡢�ɤΥ���ܥ�å���⤿�ɤ�ޤ��� ���줬�ǥե���ȤǤ��� .It Fl R ���ꤵ�줿�ե����뼫�Ȥ����ǤϤʤ���������롼�ȤȤ��� �ǥ��쥯�ȥ곬�ؤ�Ƶ�Ū�˸������ƥ⡼�ɤ��ѹ����ޤ��� .It Fl v .Nm ���Ĺ�ˤ����⡼�ɤ��ѹ������ե������ɽ�������ޤ��� .Fl v ��ʣ������ꤵ�줿��硢�ե�����ε�⡼�ɤȿ��⡼�ɤ��� 8 �ʿ�����ӥ���ܥ�ˤ�ɽ������ޤ��� .El .Pp .Fl H , .Fl L , .Fl P ���ץ����ϡ� .Fl R ���ץ�����ꤵ��Ƥ��ʤ����̵�뤵��ޤ����ޤ�������餬 ʣ�����ꤵ���ȺǸ�˻��ꤷ����Τ�ͭ���ˤʤ�ޤ��� .Pp �ե�����Υ⡼�ɤ��ѹ��Ϥ��Υե�����ν�ͭ�Ԥȥ����ѥ桼�������ˤ��� ������Ƥ��ޤ��� .Sh ���� .Ex -std .Sh �⡼�� �⡼�ɤˤϡ����ͤ��Ѥ��������ͻ���ȡ�����ܥ�ˤ����꤬����ޤ��� ���ͻ���Ǥϡ��ʲ����ͤ� .Ar ``or'' ���Ȥ߹�碌�� 8 �ʿ����Ѥ��ޤ�: .Pp .Bl -tag -width 6n -compact -offset indent .It Li 4000 (setuid �ӥå�) ���ΥӥåȤ����åȤ���Ƥ���¹Բ�ǽ�ե�����ϡ� �ե�������ͭ����桼�� ID �˼¸��桼�� ID �����ꤵ��Ƽ¹Ԥ���ޤ��� ���ΥӥåȤåȤ���Ƥ���ǥ��쥯�ȥ�ϡ� ������Ǻ�����������ƤΥե����뤪��ӥǥ��쥯�ȥ�ν�ͭ�Ԥ� �ǥ��쥯�ȥ�ν�ͭ�Ԥ����ꤹ�뤳�Ȥ������� ��������ץ������Υ桼�� ID ��̵�ط��Ȥʤ�ޤ��� ����ϡ��ǥ��쥯�ȥ꤬¸�ߤ���ե����륷���ƥब ���ε�ǽ�ݡ��Ȥ��Ƥ�����˸¤��ޤ�: .Xr chmod 2 �� .Xr mount 8 �� .Cm suiddir ���ץ����Ȥ��Ƥ��������� .It Li 2000 (setgid �ӥå�) ���ΥӥåȤ����åȤ���Ƥ���¹Բ�ǽ�ե�����ϡ� �ե�������ͭ���륰�롼�� ID �˼¸����롼�� ID �����ꤵ��Ƽ¹Ԥ���ޤ��� .It Li 1000 (���ƥ��å��ӥå�)�� .Xr chmod 2 �� .Xr sticky 8 �Ȥ��Ƥ��������� .It Li 0400 ��ͭ�Ԥ��ɤ߹��ߤ���ġ� .It Li 0200 ��ͭ�Ԥν��ߤ���ġ� .It Li 0100 �ե�����ξ�硢��ͭ�Ԥμ¹Ԥ���ġ� �ǥ��쥯�ȥ�ξ�硢��ͭ�Ԥθ�������ġ� .It Li 0040 ���롼�פΥ��Ф��ɤ߹��ߤ���ġ� .It Li 0020 ���롼�פΥ��Фν��ߤ���ġ� .It Li 0010 �ե�����ξ�硢���롼�פΥ��Фμ¹Ԥ���ġ� �ǥ��쥯�ȥ�ξ�硢���롼�פΥ��Фθ�������ġ� .It Li 0004 ¾�Ԥ��ɤ߹��ߤ���ġ� .It Li 0002 ¾�Ԥν��ߤ���ġ� .It Li 0001 �ե�����ξ�硢¾�Ԥμ¹Ԥ���ġ� �ǥ��쥯�ȥ�ξ�硢¾�Ԥθ�������ġ� .El .Pp �㤨�С���ͭ�Ԥ��ɤ߹��ߡ����ߡ��¹Ԥ���Ĥ��� ���롼�פΥ��Ф��ɤ߹��ߡ��¹Ԥ���Ĥ��� ¾�Ԥ��ɤ߹��ߡ��¹Ԥ���Ĥ��� set-uid �� set-gid ����ꤷ�ʤ������ͻ���Υ⡼�ɤϡ� 755 (400+200+100+040+010+004+001) �Ȥʤ�ޤ��� .Pp ����ܥ�ˤ�����ϰʲ���ʸˡ�˽����ޤ��� .Bd -literal -offset indent mode ::= clause [, clause ...] clause ::= [who ...] [action ...] action action ::= op [perm ...] who ::= a | u | g | o op ::= + | \- | = perm ::= r | s | t | w | x | X | u | g | o .Ed .Pp .Ar who ����ܥ�� ``u'', ``g'', ``o'' �Ϥ��줾��桼�������롼�ס�����ʳ��� �������ޤ���``a'' ����ܥ�� ``ugo'' ����ꤷ������Ʊ���ˤʤ�ޤ��� .Pp .Ar perm ����ܥ�ϥ⡼�ɤγƥӥåȤ�ʲ��Τ褦��ɽ�����ޤ��� .Pp .Bl -tag -width Ds -compact -offset indent .It r �ɤ߹��ߵ��ĥӥå� .It s �¹Ի� setuid ����Ӽ¹Ի� setgid �ӥå� .It t sticky �ӥå� .It w ���ߵ��ĥӥå� .It x �¹�/���� ���ĥӥå� .It X �оݤ��ǥ��쥯�ȥ�Ǥ��뤫���ѹ����Υ⡼�ɤ�ï���μ¹�/�������ĥӥå� ��Ω�äƤ�����ˡ��¹�/�������ĥӥåȤ����åȤ���ޤ��� .Ar perm ����ܥ�Ǥ� ``X'' �λ���ϡ� .Ar op ����ܥ�� ``+''��Ϣ�뤹����Τ߰�̣�����ꡢ¾�ξ���̵�뤵��ޤ��� .It u ���Ρ��ե�����ν�ͭ�Ե��ĥӥå� .It g ���Ρ��ե�����Υ��롼���ĥӥå� .It o ���Ρ��ե�����ν�ͭ�Ԥȥ��롼�װʳ��ε��ĥӥå� .El .Pp .Ar op ����ܥ��Ư���ϰʲ��Τ褦�ˤʤ�ޤ� .Bl -tag -width 4n .It + .Ar perm �ͤ����ꤵ��ʤ���С�``+'' �ϲ��κ��Ѥ⤢��ޤ��� .Ar who ����ܥ뤬���ꤵ��Ƥ��ʤ���С� .Ar perm �ͤϤ��줾��� who ����ܥ���б�����ӥåȤ˺��Ѥ�������� umask �� �ޥ��������ӥåȤ����åȤ���ޤ��� .Ar who ����ܥ뤬���ꤵ��Ƥ���С����� .Ar perm �ͤ����ꤵ��ޤ��� .It \&\- .Ar perm �ͤ����ꤵ��Ƥ��ʤ���С�``\-'' �ϲ��κ��Ѥ⤢��ޤ��� .Ar who ����ܥ뤬���ꤵ��Ƥ��ʤ���С� .Ar perm �ͤϤ��줾��� who ����ܥ���б�����ӥåȤ˺��Ѥ�������� umask �� �ޥ��������ӥåȤ����ꥢ����ޤ��� .Ar who ����ܥ뤬���ꤵ��Ƥ���С����� .Ar perm �ͤ����ꥢ����ޤ��� .It = .Ar who ����ܥ�ǻ��ꤵ�줿�⡼�ɥӥåȤ����ꥢ����ޤ���who ����ܥ뤬���� ����Ƥ��ʤ���С���ͭ�ԡ����롼�ס�����¾�γƥ⡼�ɥӥåȤ����ꥢ���� �ޤ��� .Ar who ����ܥ뤬���ꤵ��Ƥ��ʤ���С� perm �ǻ��ꤷ���ӥåȤ�����ͭ�ԡ����롼�ס�����¾�Τ��줾��� umask �� �ޥ���������Τ������ꤵ��ޤ��� .Ar who ����ܥ�� .Ar perm �����ꤵ��Ƥ���С������ͤ����Τޤ����ꤵ��ޤ��� .El .Pp �� .Ar clause �Ǥϡ��⡼�ɥӥåȤ����뤿��Υ��ڥ졼������ 1 �İʾ嵭�Ҥ��ʤ� ��Фʤ�ޤ������Ƴƥ��ڥ졼�����ϵ��Ҥ������֤�Ŭ�Ѥ���ޤ��� .Pp ��ͭ�Ԥȥ��롼�װʳ��� ``o'' �Τߤ��Ф��ơ�``s'' �� ``t'' ���Ȥ߹�碌�� .Ar perm �ͤ����ꤵ��Ƥ�̵�뤵��ޤ��� .Sh ������ .Bl -tag -width "u=rwx,go=u-w" -compact .It Li 644 �ե������ï�ˤǤ��ɤ��褦�ˤ��ơ��ե�����ν�ͭ�ԤΤ߽��߲�ǽ�� ���ޤ��� .Pp .It Li go-w �ե�����ν�ͭ�ʳ��ν��ߤ�ػߤ��ޤ��� .Pp .It Li =rw,+X umask �ǥޥ�������Ƥ��ʤ��ӥåȤ��ɤ߽���Ĥ��ޤ������¹Ե��Ĥ� �������ꤵ��Ƥ����Τ��ݻ����ޤ��� .Pp .It Li +X ï�����¹ԡ�������ǽ�ʥե������ǥ��쥯�ȥ�ʤ�С����٤ƤΥ桼���� �¹ԡ������Ǥ���ե������ǥ��쥯�ȥ�Ȥ��ޤ��� .Pp .It Li 755 .It Li u=rwx,go=rx .It Li u=rwx,go=u-w ï�ˤǤ��ɤ߹��ߤȼ¹Ԥ��Ǥ��ơ���ͭ�ԤΤ߽��߲�ǽ�ˤʤ�褦�ˤ��� ���� .Pp .It Li go= ���롼�פ䤽��¾�Υ桼���ˤ����ʤ���Ĥ�Ϳ���ޤ��� .Pp .It Li g=u-w ���롼�ץӥåȤ�桼���ӥåȤ�Ʊ���ˤ��ޤ��������롼�פν��ߤ϶ػ� ���ޤ��� .El .Sh �Х� naughty bit �Τ���� .Ar perm ���ץ������ޤ��� .Sh �ߴ��� .Fl v ���ץ�������ɸ��Ǥ��ꡢ������ץ���λ��Ѥ���侩�Ǥ��� .Sh ��Ϣ���� .Xr chflags 1 , .Xr install 1 , .Xr setfacl 1 , .Xr chmod 2 , .Xr stat 2 , .Xr umask 2 , .Xr fts 3 , .Xr setmode 3 , .Xr symlink 7 , .Xr chown 8 , .Xr mount 8 , .Xr sticky 8 .Sh ���� .Nm �桼�ƥ���ƥ��ϡ����ʤˤʤ� .Ar perm ����ܥ�� .Dq t ������Ƥ� .St -p1003.2 �ߴ��ˤʤ�褦�˺���Ƥ��ޤ��� .Sh ��� .Nm ���ޥ�ɤ� .At v1 ����Ƴ������ޤ�����