"polkit.service" encounter "Permission denied" error when trying to open its authorization rules directories
This document (000021187) is provided subject to the disclaimer at the end of this document.
Environment
Situation
# systemctl status polkit.service ... ...... myserver polkitd[31845]: Loading rules from directory /etc/polkit-1/rules.d ...... myserver polkitd[31845]: Error opening rules directory: Error opening directory “/etc/polkit-1/rules.d”: Permission denied (g-file-error-quark, 2) ...... myserver polkitd[31845]: Loading rules from directory /usr/share/polkit-1/rules.d ...... myserver polkitd[31845]: Error opening rules directory: Error opening directory “/usr/share/polkit-1/rules.d”: Permission denied (g-file-error-quark, 2)Due to this error, some Application services may fail to start if they are managed by the polkit rules.
Resolution
ls -ld /etc/polkit-1/rules.d/
ls -ld /usr/share/polkit-1/rules.d/
2. The correct "user" and "group" ownership setting for the directories should be "polkitd" and "root" respectively.
If the ownership setting for the directories are different, make the necessary correction:
chown polkitd:root /etc/polkit-1/rules.d
chown polkitd:root /usr/share/polkit-1/rules.d
3. Restart the "polkit.service" with the following commands:
systemctl restart polkit.service
4. Check the status of the "polkit.service":
systemctl status polkit.service
The "Permission denied" errors should not be shown anymore.
Cause
Additional Information
# ls -ld /etc/polkit-1/rules.d/ drwx------ 1 polkitd root 76 Jul 31 19:23 /etc/polkit-1/rules.d # ls -ld /usr/share/polkit-1/rules.d/ drwx------ 1 polkitd root 106 Jul 31 19:08 /usr/share/polkit-1/rules.d/Newer versions of SAP services which are integrated to systemd in SUSE Linux Enterprise Server 15 may be affected by this issue and cannot be started.
Refer to SAP Note 3369963 - Linux: Instance startup fails with 'Interactive authentication required'
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021187
- Creation Date: 30-Aug-2023
- Modified Date:30-Aug-2023
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com