Bug 81015 - systemd-resolved requires +x on resolved.conf parent directory
Summary: systemd-resolved requires +x on resolved.conf parent directory
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: Other Linux (All)
: medium trivial
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-07 20:37 UTC by mehe.schmid+freedesktop
Modified: 2014-07-17 02:31 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description mehe.schmid+freedesktop 2014-07-07 20:37:29 UTC
If +x isn't set on the parent directory of resolved.conf, systemd-resolved seems to fail to start.

The error message I get is:
Failed to open configuration file /etc/systemd/resolved.conf: Permission denied

This is also repeatable if invoking the systemd-resolved binary directly, without using systemctl.


But what really is wrong is that +x isn't set on the parent directory /etc/systemd, changing any permissions on the file itself doesn't help.


Perhaps systemd-resolved could access this file without +x on the parent directory, or at least warn that the permissions on the parent directory are wrong?
Comment 1 Zbigniew Jedrzejewski-Szmek 2014-07-17 02:31:40 UTC
This was changed in http://cgit.freedesktop.org/systemd/systemd/commit/?id=74b2466e14. systemd-resolved will now loudly complain, but continue.

But in general, for most daemons it makes sense to fail to start if their configuration files are mangled or otherwise broken, as this means that there's a problem that needs to be fixed, and often it is better to abort then delived half-broken results, so this change might get reverted.

Also, systemd-resolved simply tries to open the file using a direct open() call. If the kernel does not allow that, then the daemon cannot do anything about it.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.