Bug 1353964
Summary: | Log files for ipa in /var/log/ipa and /var/log directory must have similar permissions. | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 8 | Reporter: | Sudhir Menon <sumenon> |
Component: | ipa | Assignee: | IPA Maintainers <ipa-maint> |
Status: | CLOSED WONTFIX | QA Contact: | Kaleem <ksiddiqu> |
Severity: | unspecified | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | ipa-maint, pasik, pcech, pvoborni, rcritten, tscherf |
Target Milestone: | rc | Keywords: | Triaged |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2020-10-22 11:49:18 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Sudhir Menon
2016-07-08 14:31:47 UTC
triage notes: """ mbasti: it looks like these logs (ipactl.log, default.log) are created by something else (systemd?) and they contain text from stderr I suspect that ipactl.log is STDERR output from `systemctl start ipa` IPA default logger setup has permission 0o600 """ Upstream ticket: https://fedorahosted.org/freeipa/ticket/6104 These are logs created via the context log in ipalib/plugable.py and not by standard ipa logger. We can approach this in one of two ways: If the log doesn't exist: create it chmod it to 0600 or If the log doesn't exist: create it chmod it to 0600 Something like: diff --git a/ipalib/plugable.py b/ipalib/plugable.py index 4c2782dbf..899805b46 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -521,6 +521,9 @@ class API(ReadOnly): if self.env.log is not None: try: handler = logging.FileHandler(self.env.log) + if not os.path.exists(self.env.log): + open(self.env.log, 'a').close() + os.chmod(self.env.log, 0o600) except IOError as e: logger.error('Cannot open log file %r: %s', self.env.log, e) else: I don't know why a user would want to temporarily change the mode of the log file and the second method would tighten up perms on existing context logs once the context is used again. This BZ has been evaluated multiple times over the last several years and we assessed that it is a valuable request to keep in the backlog and address it at some point in future. Time showed that we did not have such capacity, nor have it now nor will have in the foreseeable future. In such a situation keeping it in the backlog is misleading and setting the wrong expectation that we will be able to address it. Unfortunately we will not. To reflect this we are closing this BZ. If you disagree with the decision please reopen or open a new support case and create a new BZ. However this does not guarantee that the request will not be closed during the triage as we are currently applying much more rigor to what we actually can accomplish in the foreseeable future. Contributions and collaboration in the upstream community and CentOS Stream is always welcome! Thank you for understanding. Red Hat Enterprise Linux Identity Management Team The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |