fix: fix non-root users cannot create log files even if they have write
permission of the directory
This commit is contained in:
parent
cfe2cf0ebd
commit
89ff78d99c
|
@ -206,8 +206,12 @@ int32_t taosMulModeMkDir(const char *dirname, int mode) {
|
|||
#endif
|
||||
|
||||
if (taosDirExist(temp)) {
|
||||
if (taosCheckAccessFile(temp, TD_FILE_ACCESS_WRITE_OK)) {
|
||||
return code;
|
||||
} else {
|
||||
return chmod(temp, mode);
|
||||
}
|
||||
}
|
||||
|
||||
if (strncmp(temp, TD_DIRSEP, 1) == 0) {
|
||||
pos += 1;
|
||||
|
|
Loading…
Reference in New Issue