-
Notifications
You must be signed in to change notification settings - Fork 103
Issue 6155 - ldap-agent fails to start because of permission error #6179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note: |
|
Split the test in two and skip AVC test if SELinux is not enabled. |
5bc7225 to
daee45d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
…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)
…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)
…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)
…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)
…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)
…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)
…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)
…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)
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 ! )