There are processes which are executed with root permissions and then
change the user during run on target.
Without setting up the file mode to 0777 trying to write log causes
write error and process exits.
Change-Id: I88c6738625d67f4db2efea76cc8928d4f58b6e7c
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
static const char *kWriteError =
"ReportFile::Write() can't output requested buffer!\n";
ReopenIfNecessary();
- fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ fchmod(fd, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (length != internal_write(fd, buffer, length)) {
internal_write(fd, kWriteError, internal_strlen(kWriteError));
Die();