Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 760084 - acct-user/etcd: User home is created with wrong permissions (dev-db/etcd-3.4.11 fails to start)
Summary: acct-user/etcd: User home is created with wrong permissions (dev-db/etcd-3.4....
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-15 17:23 UTC by Tim Mohlmann
Modified: 2020-12-22 03:56 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info dev-db/etcd (file_760084.txt,18.43 KB, text/plain)
2020-12-15 17:26 UTC, Tim Mohlmann
Details
acct-user/etcd: Apply correct permissions to ACCT_USER_HOME (file_760084.txt,354 bytes, patch)
2020-12-15 17:51 UTC, Tim Mohlmann
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mohlmann 2020-12-15 17:23:34 UTC
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.
Comment 1 Tim Mohlmann 2020-12-15 17:26:19 UTC
Created attachment 678397 [details]
emerge --info dev-db/etcd
Comment 2 Tim Mohlmann 2020-12-15 17:48:13 UTC
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
Comment 3 Tim Mohlmann 2020-12-15 17:51:34 UTC
Created attachment 678403 [details, diff]
acct-user/etcd: Apply correct permissions to ACCT_USER_HOME

Locally tested this resolves the bug.
Comment 4 Larry the Git Cow gentoo-dev 2020-12-22 03:56:12 UTC
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(+)