-
-
Notifications
You must be signed in to change notification settings - Fork 32.8k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.
Description
- Version: 9.6.1
- Platform: Windows 7 Professional x64
- Subsystem: fs
fs.access() returns no error when given a file/directory with no priveleges.
Code example:
'use strict'
const fs = require('fs')
fs.access('./restricted', fs.constants.R_OK || fs.constants.W_OK, err => {
if (err) {
console.log(err)
} else {
console.log('no access() error')
}
})
fs.stat('./restricted', (err, stat) => {
if (err) {
console.log(err)
} else {
console.log('no stat() error')
}
})
Output:
no access() error
{ Error: EPERM: operation not permitted
errno: -4048,
code: 'EPERM',
syscall: 'stat',
path: 'C:\\Workspaces\\restricted' }
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.windowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.