Next Previous Contents

24. chown

Synopsis

Change the owner of a file

Usage

Integer_Type chown (String_Type file, Integer_Type uid, Integer_Type gid)

Description

The chown function is used to change the user-id and group-id of file to uid and gid, respectively. It returns zero upon success and -1 upon failure, with errno set accordingly.

Notes

On most systems, only the super user can change the ownership of a file.

Some systems do not support this function.

See Also

chmod, stat_file


Next Previous Contents