chown(1) DG/UX R4.11 chown(1)
NAME
chown - change file owner
SYNOPSIS
chown [-R] [-h] owner file ...
DESCRIPTION
chown changes the owner of the files to owner. The owner may be
either a decimal user ID or a login name found in /etc/passwd file.
If chown is invoked by other than a user with appropriate privilege,
the set-user-ID bit of the file mode, 04000, is cleared.
For systems supporting the DG/UX Capability Option, appropriate
privilege is defined as having one or more specific capabilities
enabled in the effective capability set of the user. See
capdefaults(5) for the default capabilities for this command.
On generic DG/UX systems, appropriate privilege means that your
process has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
Only the owner of a file (or a user with appropriate privilege) may
change the owner of that file.
Valid options to chown are:
-R Recursive. chown descends through the directory, and any
subdirectories, setting the ownership ID as it proceeds. When
symbolic links are encountered, they are traversed.
-h If the file is a symbolic link, change the owner of the
symbolic link. Without this option, the owner of the file
referenced by the symbolic link is changed.
EXAMPLES
$ ls -l testfile
-rw-rw-rw- 1 intern other 349 Nov 18 13:26 testfile
$ chown wilson testfile
$ ls -l testfile
-rw-rw-rw- 1 wilson other 349 Nov 18 13:26 testfile
$
The original owner of test_file was intern. After the chown command
was executed, the new owner becomes wilson. Only the current owner
of a file or a user with appropriate privilege can change the owner
name.
FILES
/etc/passwd
SEE ALSO
chgrp(1), chmod(1), id(1), logname(1), ls(1). chown(2), passwd(4),
capdefaults(5).
Licensed material--property of copyright holder(s)