chown(1)
_________________________________________________________________
chown, chgrp Command
change owner or group
_________________________________________________________________
SYNTAX
chown owner file ...
chgrp group file ...
DESCRIPTION
Chown changes the owner of file to owner. The owner may be
either a user ID or a login name found in the password file.
Chgrp changes the group ID of file to group. The group may be
either a decimal group ID or a group name found in the group
file.
If either command is invoked by other than the super-user, the
set-user-ID and set-group-ID bits of the file mode, 4000 and 2000
respectively, will be cleared.
_________________________________________________________________
EXAMPLES
$ ls -l testfile
-rw-rw-rw- 1 intern other 349 Nov 18 13:26 test_file
$ chown wilson testfile
$ ls -l testfile
-rw-rw-rw- 1 wilson other 349 Nov 18 13:26 test_file
$
Intern, was the original owner of test_file. After the chown
command was executed, the new owner becomes wilson. Only the
current owner of a file or superuser can change the owner name.
$ chgrp 1009 chapter
If you own a file "chapter", the new group will be the group
named by the numeric group ID "1009". "1009" must be a valid
group ID listed in the /etc/group file.
$ chgrp work *
DG/UX 4.00 Page 1
Licensed material--property of copyright holder(s)
chown(1)
This command changes the group for all the files you own in the
current directory. The new group will be the group with the group
name "work." "Work" must be a valid group name listed in the
/etc/group file.
_________________________________________________________________
FILES
/etc/passwd
/etc/group
SEE ALSO
chmod(1).
chown(2), group(4), passwd(4) in the Programmer's Reference for
the DG/UX System
DG/UX 4.00 Page 2
Licensed material--property of copyright holder(s)