Skip to content

DAOS-18262 common: make sure DAOS file permissions are always 0XXY#17680

Merged
daltonbohning merged 14 commits intomasterfrom
janekmi/DAOS-18262-0660
Apr 6, 2026
Merged

DAOS-18262 common: make sure DAOS file permissions are always 0XXY#17680
daltonbohning merged 14 commits intomasterfrom
janekmi/DAOS-18262-0660

Conversation

@janekmi
Copy link
Copy Markdown
Contributor

@janekmi janekmi commented Mar 10, 2026

At least:

  • 0660 for files
  • 0770 for directories.

So daos_server group can access DAOS files.

Guide MD-on-PMEM

daos/                           src/control/server/storage/mount/provider.go:23
├── 8ac60360-eae4-4071-86ac-a83a42dc22a3        src/mgmt/srv_target.c:699
│   ├── rdb-pool                No change
│   └── vos-X                   src/vos/vos_pool.c:1001
├── control_raft                src/control/system/raft/raft_recovery.go:93
│   ├── daos_system.db          src/control/system/raft/raft.go:269
│   └── snapshots               No change
├── daos_sys                    src/vos/sys_db.c:131
│   └── sys_db                  No change
├── NEWBORNS                    src/mgmt/srv_target.c:452
├── superblock                  src/control/common/file_utils.go:141,src/control/server/instance_superblock.go:208
└── ZOMBIES                     src/mgmt/srv_target.c:460

Guide MD-on-SSD

tree daos/
daos/                           src/control/server/storage/mount/provider.go:23
├── b4defdf5-a92f-45fe-9be0-b96122efa42d        src/mgmt/srv_target.c:699
│   ├── rdb-pool                No change
│   └── vos-X                   src/mgmt/mgmt_common.c:211
├── NEWBORNS                    src/mgmt/mgmt_common.c:134
└── ZOMBIES                     src/mgmt/mgmt_common.c:134
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:208

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

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>
@janekmi janekmi requested review from a team as code owners March 10, 2026 20:32
@github-actions
Copy link
Copy Markdown

Ticket title is 'dlck command seems to require sudo privileges. Also hit the DER_NOMEM (-1009) issue.'
Status is 'Awaiting Verification'
Labels: 'test_2.8'
https://daosio.atlassian.net/browse/DAOS-18262

@janekmi janekmi requested review from rpadma2 and tanabarr March 10, 2026 21:23
Comment thread src/rdb/rdb.c Outdated
Comment thread src/rdb/rdb.c
Comment thread src/rdb/rdb.c Outdated
@janekmi janekmi requested a review from grom72 March 11, 2026 09:42
Comment thread src/mgmt/srv_target.c Outdated
Comment thread src/control/server/storage/bdev/backend_class.go
Comment thread src/control/server/storage/bdev/backend_class.go Outdated
Comment thread src/control/system/raft/raft.go Outdated
Comment thread src/mgmt/mgmt_common.c Outdated
Comment thread src/control/system/raft/raft_recovery.go Outdated
Comment thread src/control/server/storage/mount/provider.go
Remove from tgt_create_preallocate() and rdb_create().
Add one in ds_mgmt_create_pool().

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@daosbuild3
Copy link
Copy Markdown
Collaborator

Test stage Functional Hardware Medium MD on SSD completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-17680/2/testReport/

tanabarr
tanabarr previously approved these changes Mar 12, 2026
Copy link
Copy Markdown
Contributor

@tanabarr tanabarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread src/control/server/storage/metadata/provider.go
Comment thread src/vos/sys_db.c Outdated
Comment thread src/control/server/storage/metadata/provider.go
Comment thread src/control/server/storage/metadata/provider.go
Comment thread src/control/system/raft/raft.go Outdated
janekmi added 2 commits March 16, 2026 19:56
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
Add two constants and apply where possible:

- DefaultFilePerm and
- DefaultDirPerm

Define Mkdir2() as Mkdir() + Chmod().

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
tanabarr
tanabarr previously approved these changes Mar 17, 2026
Copy link
Copy Markdown
Contributor

@tanabarr tanabarr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, comments are nonblocking and suggestions only

Comment thread src/control/common/file_utils.go Outdated
Comment thread src/mgmt/mgmt_common.c Outdated
Comment thread src/control/common/file_utils.go Outdated
janekmi added 2 commits March 17, 2026 14:52
... both for C and Go.

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
- remove other umask() calls
- remove chmod() calls

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@janekmi janekmi requested a review from liw March 17, 2026 16:57
tanabarr
tanabarr previously approved these changes Mar 17, 2026
Comment thread src/control/common/file_utils.go Outdated
Comment thread src/control/common/file_utils.go Outdated
Comment thread src/control/provider/system/system_linux.go Outdated
Comment thread src/control/server/storage/metadata/provider.go Outdated
Comment thread src/control/server/storage/metadata/provider.go
Comment thread src/control/server/storage/mount/provider.go Outdated
... remove SystemProvider.Mkdir2 and use .Mkdir instead.

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@janekmi janekmi requested a review from kjacque March 31, 2026 16:13
Copy link
Copy Markdown
Contributor

@kjacque kjacque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes overall look good, just some small cleanup requested. Thanks!

Comment thread src/control/common/file_utils_test.go Outdated
Comment thread src/control/common/file_utils_test.go Outdated
Comment thread src/control/lib/daos/pool_property.go Outdated
... minor fixes in the TestUtils_MkdirForcePerm() test.

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@janekmi janekmi requested a review from kjacque March 31, 2026 17:48
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@daosbuild3
Copy link
Copy Markdown
Collaborator

Comment thread src/control/lib/daos/pool_property.go
janekmi added 2 commits April 1, 2026 10:48
Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
…0660

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@janekmi janekmi requested a review from grom72 April 1, 2026 10:50
…0660

Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com>
@janekmi janekmi requested a review from a team April 5, 2026 16:24
@daltonbohning daltonbohning merged commit 15b7183 into master Apr 6, 2026
42 checks passed
@daltonbohning daltonbohning deleted the janekmi/DAOS-18262-0660 branch April 6, 2026 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

7 participants