Change directories' permission of config xml file 77/290177/1
authordyamy-lee <dyamy.lee@samsung.com>
Wed, 21 Dec 2022 06:53:13 +0000 (15:53 +0900)
committerdyamy-lee <dyamy.lee@samsung.com>
Tue, 21 Mar 2023 06:01:34 +0000 (15:01 +0900)
- Issue : In case of root daemon, it cannot read tts-config file because permission didn't allow it.

- Solution : We change tts-config file's directory permission every user can read the tts-config file.

Change-Id: I133de3acfbb8286890558837953cfa871c5dd413

common/tts_config_parser.c

index 1e8069a..ed346d5 100644 (file)
@@ -574,7 +574,7 @@ int tts_parser_load_config(void)
                } while (0 != ret);
 
                /* Set mode */
-               if (0 > chmod(TTS_CONFIG, 0600)) {
+               if (0 > chmod(TTS_CONFIG, 0644)) {
                        SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to change file mode : %d", ret);
                }
 
@@ -678,7 +678,7 @@ int tts_parser_copy_xml(const char* original, const char* destination)
        }
 
        /* Set mode */
-       if (0 > chmod(destination, 0600)) {
+       if (0 > chmod(destination, 0644)) {
                SLOG(LOG_ERROR, TAG_TTSCONFIG, "[ERROR] Fail to change file mode : %d", ret);
        }