Issue 6155 - ldap-agent fails to start because of permission error#6179
Merged
progier389 merged 1 commit into389ds:mainfrom Jul 8, 2024
Merged
Issue 6155 - ldap-agent fails to start because of permission error#6179progier389 merged 1 commit into389ds:mainfrom
progier389 merged 1 commit into389ds:mainfrom
Conversation
Contributor
Author
|
Note: |
vashirov
reviewed
May 28, 2024
Contributor
Author
|
Split the test in two and skip AVC test if SELinux is not enabled. |
5bc7225 to
daee45d
Compare
progier389
added a commit
that referenced
this pull request
Jul 8, 2024
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
progier389
added a commit
that referenced
this pull request
Jul 8, 2024
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
Contributor
Author
progier389
added a commit
that referenced
this pull request
Mar 12, 2025
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
progier389
added a commit
that referenced
this pull request
Mar 12, 2025
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
progier389
added a commit
that referenced
this pull request
Mar 12, 2025
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
progier389
added a commit
that referenced
this pull request
Mar 12, 2025
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
progier389
added a commit
that referenced
this pull request
Mar 12, 2025
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
progier389
added a commit
that referenced
this pull request
Mar 12, 2025
…6179) Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files One workaround is to use the dac_override capability but it is a bad practice. Fix: Setting proper permissions: Running ldap-agent with uid=root and gid=dirsrv to be able to access both snmp and dirsrv resources. Setting read permission on the group for the dse.ldif file Setting r/w permissions on the group for the snmp semaphore and mmap file For that one special care is needed because ns-slapd umask overrides the file creation permission as is better to avoid changing the umask (changing umask within the code is not thread safe, and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file if the needed permission are not set. Issue: #6155 Reviewed by: @droideck , @vashirov (Thanks ! ) (cherry picked from commit eb7e57d)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: dirsrv-snmp service fails to starts when SELinux is enforced because of AVC preventing to open some files
One workaround is to use the dac_override capability but it is a bad practice.
Fix: Setting proper permissions:
For that one special care is needed because ns-slapd umask overrides the file creation permission
as is better to avoid changing the umask (changing umask within the code is not thread safe,
and the current 0022 umask value is correct for most of the files) so the safest way is to chmod the snmp file
if the needed permission are not set.
Issue: #6155
Reviewed by: @droideck , @vashirov (Thanks ! )