diff --git a/lib/fs.js b/lib/fs.js index 6129e3c3ef3..71eace0aef5 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -2896,7 +2896,7 @@ const promises = { if (constants.O_SYMLINK !== undefined) { const fd = await promises.open(path, constants.O_WRONLY | constants.O_SYMLINK); - return promises.fschmod(fd, mode).finally(fd.close.bind(fd)); + return promises.fchmod(fd, mode).finally(fd.close.bind(fd)); } throw new errors.Error('ERR_METHOD_NOT_IMPLEMENTED'); }, @@ -2905,7 +2905,7 @@ const promises = { if (constants.O_SYMLINK !== undefined) { const fd = await promises.open(path, constants.O_WRONLY | constants.O_SYMLINK); - return promises.fschmod(fd, uid, gid).finally(fd.close.bind(fd)); + return promises.fchown(fd, uid, gid).finally(fd.close.bind(fd)); } throw new errors.Error('ERR_METHOD_NOT_IMPLEMENTED'); },