mirror of
https://github.com/acme-dns/acme-dns.git
synced 2026-04-27 04:45:48 +03:00
[GH-ISSUE #88] acme-dns needs directory permissions in systemd (documentation) #35
Labels
No labels
Documentation
Documentation
bug
enhancement
feature request
feature request
help wanted
pull-request
question
security
security
testing
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/acme-dns#35
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jvanasco on GitHub (May 31, 2018).
Original GitHub issue: https://github.com/acme-dns/acme-dns/issues/88
I updated my install to control acme-dns via systemd, with an acme-dns user.
I changed the ownership of items in
/etc/acme-dnstoacme-dns.If the
/etc/acme-dnsdirectory is owned byroot, there are errors in accessing the existing database/etc/acme-dns/acme-dns.db. If the directory is owned byacme-dns, the db is read fine.Stated differently,
I'm not sure how/why this is happing, but I think it is due to sqlite not being able to make lock files.
@joohoi commented on GitHub (May 31, 2018):
Thanks for bringing this up! I'll investigate a bit, but it looks like we should make slight modifications to the documentation. Pinging @gabe565 as they contributed the systemd service file and docs.
@gabe565 commented on GitHub (May 31, 2018):
I honestly forgot that this is configurable. In my setup, I have the
/etc/acme-dnsdirectory as owned by root, then have the database in/var/lib/acme-dnsand have it owned byacme-dnswith 600 permissions. I will PR another step with that setup.@jvanasco commented on GitHub (May 31, 2018):
after some testing * checking the sqlite docs regarding locks, the issue is definitely due to the acme-dns user needing write permissions for the directory which the database file is in.
@gabe565 commented on GitHub (Jun 1, 2018):
Yes that's what it looks like, which is why I would rather keep the database in
/var/lib/acme-dnssince the acme-dns user is guaranteed to own that directory (It's the acme-dns home directory), then a directory in/etcdoes not have to be writable. Does that seem right?@jvanasco commented on GitHub (Jun 1, 2018):
yeah that seems like the right approach.
if you wanted to overcomplicate things, have you considered playing the config file in there? then a user could just be added to the acme-dns group for edit privileges.
@Ajedi32 commented on GitHub (Jun 1, 2018):
Yeah, you don't want to put databases in
/etcanyway./etcon Linux is for config files./varis more appropriate for databases. See http://www.pathname.com/fhs/pub/fhs-2.3.html