Skip to content

fs.createFile with mode as unused input #4811

Description

@Martin-Zeithaml
// cf_test.js
import * as fs from '/zowe/bin/libs/fs';

fs.createFile("./test666.txt", 0o666, "Hello, world!");
fs.createFile("./test600.txt", 0o600, "Hello, world!");
fs.createFile("./test000.txt", 0o000, "Hello, world!");
fs.createFile("./test9999.txt", 9999, "Hello, world!");
$ ./configmgr -script cf_test.js && ls -al test*
-rw-r--r--   1 MARTIN   ZOWEGRP       13 Jun 18 03:20 test000.txt
-rw-r--r--   1 MARTIN   ZOWEGRP       13 Jun 18 03:20 test600.txt
-rw-r--r--   1 MARTIN   ZOWEGRP       13 Jun 18 03:20 test666.txt
-rw-r--r--   1 MARTIN   ZOWEGRP       13 Jun 18 03:20 test9999.txt

It seems the file is open with

const file:std.File|null = std.open(path, 'w', errObj);

regardless the mode.

Either remove the mode or implement the mask - I tried the os.umask, but with no effect.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions