Unix |
Unix v6 |
|
![]() |
chown(2) |
![]() |
chown change owner and group of a file (chmod = 16.)
sys chown; name; owner chown(name, owner)
char *name; The file whose name is given by the
null-terminated string pointed to by has its owner and group
changed to the low and high bytes of respectively. Only the
super-user may execute this call, because if users were able
to give files away, they could defeat the (nonexistent)
file-space accounting procedures. chown (VIII), chgrp
(VIII), passwd (V) The error bit (c-bit) is set on illegal
owner changes. From C a 1 returned value indicates error, 0
indicates success.
![]() |
chown(2) | ![]() |