From 350b1c2c38500703538ee4e040026ce540af263d Mon Sep 17 00:00:00 2001 From: indhuja-avs <102237613+indhuja-avs@users.noreply.github.com> Date: Fri, 25 Mar 2022 17:00:05 +0530 Subject: [PATCH] TCXB6-10197: Error in opening webpa_cfg.json Reason for change: Write permission for all - /nvram/webpa_cfg.json --- source/broadband/webpa_notification.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/broadband/webpa_notification.c b/source/broadband/webpa_notification.c index 9f1398b7..84eef88e 100644 --- a/source/broadband/webpa_notification.c +++ b/source/broadband/webpa_notification.c @@ -480,6 +480,10 @@ void loadCfgFile() int flag = 0; size_t sz; fp = fopen(WEBPA_CFG_FILE, "r"); + if (chmod(/nvram/webpa_cfg.json, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH) < 0) + { + WalError("Could not set mode 0666 on %s\n",WEBPA_CFG_FILE); + } if (fp == NULL) { WalError("Failed to open cfg file in read mode creating new file %s\n", WEBPA_CFG_FILE);