-
Notifications
You must be signed in to change notification settings - Fork 156
Closed
Description
In #601 we finished our fs.access() implementation. We have one test that is not working as expected, and currently being skipped in tests/spec/fs.access.spec.js:
it.skip('should return an error if file is not executable and mode = X_OK', function (done) {
var fs = util.fs();
var contents = 'This is a file.';
fs.writeFile('/myfile', contents, function (error) {
if (error) throw error;
fs.chmod('/myfile', 0o644, function(error){
if (error) throw error;
fs.access('/myfile', fs.constants.X_OK, function (error) {
expect(error).to.exist;
expect(error.code).to.equal('EACCES');
done();
});
});
});
});This should be failing, but isn't. We need to figure out why.
NOTE: our implementation of access() is based on the idea that the user is uid==0 (root), and generally has elevated access rights. However, if a file isn't executable (the one above is 644), we should be able to get EACCESS.
Metadata
Metadata
Assignees
Labels
No labels