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,7 +206,11 @@ int32_t taosMulModeMkDir(const char *dirname, int mode) {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (taosDirExist(temp)) {
|
if (taosDirExist(temp)) {
|
||||||
return chmod(temp, mode);
|
if (taosCheckAccessFile(temp, TD_FILE_ACCESS_WRITE_OK)) {
|
||||||
|
return code;
|
||||||
|
} else {
|
||||||
|
return chmod(temp, mode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strncmp(temp, TD_DIRSEP, 1) == 0) {
|
if (strncmp(temp, TD_DIRSEP, 1) == 0) {
|
||||||
|
|
Loading…
Reference in New Issue