After a fresh install of etcd, the service fails to start. Using systemd as service manager, I got the following error: Job for etcd.service failed because the control process exited with error code. See "systemctl status etcd.service" and "journalctl -xe" for details. This line in journalctl explains the issue: dec 15 18:58:43 sky etcd[132949]: cannot access data directory: directory "/var/lib/etcd","drwxr-xr-x" exist without desired file permission "-rwx------". Reproducible: Always Steps to Reproduce: On a box, where etcd was never installed (/var/lib/etcd must be non-existing): 1. emerge -av \=dev-db/etcd-3.4.11 2. systemctl start etcd.service (errors) 3. journalctl -xe -u etcd.service Alternatively, without systemd: 2. ETCD_DATA_DIR=/var/lib/etcd etcd (All steps as root) Actual Results: Fails to start Expected Results: Successful start WORKAROUND: Error is resolved with: chmod 700 /var/lib/etcd IMHO, this is a packaging bug. Portage should install /var/lib/etcd with the correct permissions.
Created attachment 678397 [details] emerge --info dev-db/etcd
The ebuild actually contains (correctly): fperms 0700 /var/lib/${PN} The culprit seems to be acct-user/etcd which is pulled as dependency and creates /var/lib/etcd with default permissions: ACCT_USER_HOME=/var/lib/etcd
Created attachment 678403 [details, diff] acct-user/etcd: Apply correct permissions to ACCT_USER_HOME Locally tested this resolves the bug.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05b4c1ae582d30efa85d7632d6dae8dbb1731d34 commit 05b4c1ae582d30efa85d7632d6dae8dbb1731d34 Author: William Hubbs <williamh@gentoo.org> AuthorDate: 2020-12-22 03:51:31 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2020-12-22 03:54:57 +0000 acct-user/etcd: fix home directory permissions Closes: https://bugs.gentoo.org/760084 Signed-off-by: William Hubbs <williamh@gentoo.org> acct-user/etcd/etcd-0.ebuild | 1 + 1 file changed, 1 insertion(+)