return -1;
}
+ /* Synchronize the permission mode of SDB with Connection Explorer */
+ st->st_mode = (st->st_mode & 0777000) | 0755;
+
return 0;
}
}
int writeopen_local(int fd, char* dstp, struct stat* st) {
+ mode_t mask, mode;
+
D("write open local file 'fd:%d' '%s'\n", fd, dstp);
unix_unlink(dstp);
mkdirs(dstp);
// mkdir(dstp, 0755);
- fd = sdb_creat(dstp, 0644);
+
+ /* Synchronize the permission mode of SDB with Connection Explorer */
+ mask = umask(0);
+ umask(mask);
+ mode = 0666 & (~mask);
+ fd = sdb_creat(dstp, mode);
if(fd < 0) {
print_error(SDB_MESSAGE_ERROR, F(ERR_SYNC_CREATE_FAIL, dstp), strerror(errno));