Skip to main content
function Deno.chownSync

Synchronously change owner of a regular file or directory. This functionality is not available on Windows.

 Deno.chownSync("myFile.txt", 1000, 1002);

Requires allow-write permission.

Throws Error (not implemented) if executed on Windows

Parameters

path: string

path to the file

uid: number

user id (UID) of the new owner

gid: number

group id (GID) of the new owner