Skip to content

Commit f5ca39d

Browse files
ChALkeRMylesBorins
authored andcommitted
fs: fchmod->fchown in promises/lchown
This was a clear error. chown should do chown, not chmod. PR-URL: #20407 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jamie Davis <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 0dec568 commit f5ca39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/internal/fs/promises.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ async function lchown(path, uid, gid) {
388388
if (O_SYMLINK !== undefined) {
389389
const fd = await open(path,
390390
O_WRONLY | O_SYMLINK);
391-
return fchmod(fd, uid, gid).finally(fd.close.bind(fd));
391+
return fchown(fd, uid, gid).finally(fd.close.bind(fd));
392392
}
393393
throw new ERR_METHOD_NOT_IMPLEMENTED();
394394
}

0 commit comments

Comments
 (0)