DAOS-18262 common: make sure DAOS file permissions are always 0XXY#17680
DAOS-18262 common: make sure DAOS file permissions are always 0XXY#17680
Conversation
At least: - 0660 for files - 0770 for directories. So daos_server group can access DAOS files. Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
|
Ticket title is 'dlck command seems to require sudo privileges. Also hit the DER_NOMEM (-1009) issue.' |
|
|
||
| #define D_LOGFAC DD_FAC(rdb) | ||
|
|
||
| #include <sys/stat.h> |
There was a problem hiding this comment.
[Nit] Would you mind adding this line...
|
|
||
| #include <daos_srv/rdb.h> | ||
|
|
||
| #include <daos_srv/daos_mgmt_srv.h> |
There was a problem hiding this comment.
... here instead? rdb.h was intentionally included first, without any inclusion before it, for it is the public API header of this whole module:
#include <daos_srv/rdb.h>
#include <sys/stat.h>
#include <daos...>
...
There was a problem hiding this comment.
If we move the umask calls elsewhere (see below), this inclusion will be unnecessary.
| path, (unsigned char *)uuid, params->rcp_size, 0 /* data_sz */, 0 /* meta_sz */, | ||
| VOS_POF_SMALL | VOS_POF_EXCL | VOS_POF_RDB | VOS_POF_EXTERNAL_CHKPT, | ||
| params->rcp_vos_df_version, &pool); | ||
| (void)umask(stored_mask); |
There was a problem hiding this comment.
Would it be safer and more appropriate to do this in dss_vos_pool_create (actually why not in server_init or daos_engine's main) instead? Is rdb special in some way?
At least:
So daos_server group can access DAOS files.
Guide MD-on-PMEM
Guide MD-on-SSD
tree config/daos_control/ config/daos_control/ src/control/server/storage/metadata/provider.go:207 ├── control_raft src/control/system/raft/raft_recovery.go:93 │ ├── daos_system.db src/control/system/raft/raft.go:269 │ └── snapshots No change │ └── 2-39-1773083440395 │ ├── meta.json │ └── state.bin └── engine0 src/control/server/storage/metadata/provider.go:233 ├── daos_nvme.conf src/control/server/storage/bdev/backend_class.go:106 ├── daos_sys src/vos/sys_db.c:131 │ └── sys_db No change └── superblock src/control/common/file_utils.go:141,src/control/server/instance_superblock.go:208Steps for the author:
After all prior steps are complete: