Contained Within
Find More Documentation
Featured Support Resources
| Download this book in PDF
NAME
- chgrp - change the group ownership of a file
SYNOPSIS
-
chgrp [ -f ] [ -h ] [ -R ] gid filename . . .
AVAILABILITY
- SUNWcsu
DESCRIPTION
-
chgrp changes the group ID (GID) of the files given as arguments to group. The group may be either a decimal group ID or a group name found in the group ID file, /etc/group.
- You must be the owner of the file, or be the super-user to use this command. If you are not the super-user, and successfully change the group, the set-group-id bit is cleared.
- 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 may change the group of the file only to a group to which the owner belongs. Only the superuser can arbitrarily change owner IDs whether this option is in effect or not.
OPTIONS
-
- -f
- Force. Do not report errors.
-
- -h
- If the file is a symbolic link, change the group of the symbolic link. Without this option, the group of the file referenced by the symbolic link is changed.
-
- -R
- Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group ID as it proceeds. When a symbolic link is encountered, the group of the target file is changed (unless the -h option is specified), but no recursion takes place.
ENVIRONMENT
- If any of the LC_ *variables ( LC_CTYPE, LC_MESSAGES, LC_TIME, LC_COLLATE, LC_NUMERIC, and LC_MONETARY ) (see environ(5)) are not set in the environment, the operational behavior of chgrp for each corresponding locale category is determined by the value of the LANG environment variable. If LC_ALL is set, its contents are used to override both the LANG and the other LC_ *variables. If none of the above variables is set in the environment, the "C" (U.S. style) locale determines how chgrp behaves.
-
LC_CTYPE
- Determines how chgrp handles characters. When LC_CTYPE is set to a valid value, chgrp can display and handle text and filenames containing valid characters for that locale. chgrp can display and handle Extended Unix Code (EUC) characters where any individual character can be 1, 2, or 3 bytes wide. chgrp can also handle EUC characters of 1, 2, or more column widths. In the "C" locale, only characters from ISO 8859-1 are valid.
-
LC_MESSAGES
- Determines how diagnostic and informative messages are presented. This includes the language and style of the messages, and the correct form of affirmative and negative responses. In the "C" locale, the messages are presented in the default form found in the program itself (in most cases, U.S. English).
FILES
-
/etc/group
SEE ALSO
-
chmod(1), chown(1), id(1M), chown(2), group(4), passwd(4), environ(5)
|
|