chown


Description:

public static bool chown (Path path, int uid, int gid)

Changes the owner and group of the specified path.

Note:

Changing ownership typically requires root privileges.

Example:

    var path = new Path ("/tmp/file.txt");
bool ok = Files.chown (path, 1000, 1000);

Parameters:

path

path to file or directory.

uid

the user ID of the new owner.

gid

the group ID of the new group.

Returns:

true if ownership was changed, false otherwise.