I have a structure
struct pearson_record{
unsigned char *src;
unsigned char *dst;
unsigned char type;
float rho;
};
DB *dbp;
int ret;
if ((ret = db_create(&dbp, NULL, 0)) != 0) {
fprintf(stderr, "db_create: %s\n", db_strerror(ret));
exit (1);
}
In this structure I have to store values, but right now i get an error in opening the db itself saying access.db: Permission de开发者_运维问答nied.
if ((ret = dbp->open(dbp, NULL, DATABASE, NULL, DB_BTREE, DB_CREATE, 0664)) != 0) {
dbp->err(dbp, ret, "%s", DATABASE);
}
Why do we see a Permission denied error???
精彩评论