Содержащиеся вНайти другие документыРесурсы поддержки | Загрузить это руководство в формате PDF (6561 КБ)
chown(1)Name | Synopsis | Description | Options | Operands | Usage | Examples | Environment Variables | Exit Status | Files | Attributes | See Also | Notes Name
Synopsischown [-fhR] owner[:group] file... chown -R [-f] [-H | -L | -P] owner[:group] file... DescriptionThe chown utility sets the user ID of the file named by each file to the user ID specified by owner, and, optionally, sets the group ID to that specified by group. If chown is invoked by other than the super-user, the set-user-ID bit is cleared. Only the owner of a file (or the super-user) can change the owner of that file. The operating system has a configuration option {_POSIX_CHOWN_RESTRICTED}, to restrict ownership changes. When this option is in effect the owner of the file is prevented from changing the owner ID of the file. Only the super-user can arbitrarily change owner IDs whether or not this option is in effect. To set this configuration option, include the following line in /etc/system:
To disable this option, include the following line in /etc/system:
{_POSIX_CHOWN_RESTRICTED} is enabled by default. See system(4) and fpathconf(2). Options
/usr/bin/chown and /usr/xpg4/bin/chownThe following options are supported: Specifying more than one of the mutually-exclusive options -H, -L, or -P is not considered an error. The last option specified determines the behavior of chown. /usr/bin/chownThe following options are supported: /usr/xpg4/bin/chownThe following options are supported: Operands
The following operands are supported: UsageSee largefile(5) for the description of the behavior of chown when encountering files greater than or equal to 2 Gbyte ( 231 bytes). ExamplesExample 1 Changing Ownership of All Files in the HierarchyThe following command changes ownership of all files in the hierarchy, including symbolic links, but not the targets of the links:
Environment VariablesSee environ(5) for descriptions of the following environment variables that affect the execution of chown: LANG, LC_ALL, LC_CTYPE, LC_MESSAGES, and NLSPATH. Exit Status
The following exit values are returned: FilesAttributesSee attributes(5) for descriptions of the following attributes: /usr/bin/chown
/usr/xpg4/bin/chownSee Alsochgrp(1), chmod(1), chown(2), fpathconf(2), passwd(4), system(4), attributes(5), environ(5), largefile(5), standards(5) Noteschown is CSI-enabled except for the owner and group names. Name | Synopsis | Description | Options | Operands | Usage | Examples | Environment Variables | Exit Status | Files | Attributes | See Also | Notes |
|||||||||||