diff --git a/examples/platforms/posix/flash.c b/examples/platforms/posix/flash.c index 0650289fa..eb6ac91e8 100644 --- a/examples/platforms/posix/flash.c +++ b/examples/platforms/posix/flash.c @@ -78,7 +78,7 @@ otError utilsFlashInit(void) create = true; } - sFlashFd = open(fileName, O_RDWR | O_CREAT, 0666); + sFlashFd = open(fileName, O_RDWR | O_CREAT, 0600); lseek(sFlashFd, 0, SEEK_SET); otEXPECT_ACTION(sFlashFd >= 0, error = OT_ERROR_FAILED); diff --git a/src/posix/platform/flash.c b/src/posix/platform/flash.c index 999f396e0..3f415d203 100644 --- a/src/posix/platform/flash.c +++ b/src/posix/platform/flash.c @@ -80,7 +80,7 @@ otError utilsFlashInit(void) create = true; } - sFlashFd = open(fileName, O_RDWR | O_CREAT, 0666); + sFlashFd = open(fileName, O_RDWR | O_CREAT, 0600); lseek(sFlashFd, 0, SEEK_SET); otEXPECT_ACTION(sFlashFd >= 0, error = OT_ERROR_FAILED);