// On Windows chmod is only able to manipulate read-only bit
if (is_windows) {
- mode_async = 0400; // read-only
- mode_sync = 0600; // read-write
+ mode_async = 0600; // read-write
+ mode_sync = 0400; // read-only
} else {
mode_async = 0777;
mode_sync = 0644;
var file = path.join(common.fixturesDir, 'a.js');
-fs.chmod(file, mode_async.toString(), function(err) {
+fs.chmod(file, mode_async.toString(8), function(err) {
if (err) {
got_error = true;
} else {
console.error(err.stack);
return;
}
- fs.fchmod(fd, mode_async.toString(), function(err) {
+ fs.fchmod(fd, mode_async.toString(8), function(err) {
if (err) {
got_error = true;
} else {