-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add systemd service files #121
base: master
Are you sure you want to change the base?
Conversation
In response to @proletarius101, here:
I think that's a good idea, and I'll create a new service for this purpose.
Would you elaborate on what you mean by "it's not the standard freedesktop.org arrangement"?
So indeed programs are supposed to keep their runtime data here.
This isn't true, on two counts: Secondly, it's actually much more safe to store the sensitive credentials in This is the approach taken by nearly every other server of this kind: for example, see The remaining question is how we get the rpm to automatically create this user and the One further thing: I've realised how it's strange that Thanks for your feedback - I look forward to seeing this working nicely on Fedora when we're all done! |
It's true for "runtime data". The spec says
So actually the point is, for host information (used for that computer), data should be preserved in
Well, I totally agree with what you state after this sentence. However, what I'm concerning about is when it's not mounted (with physical access, e.g. administrator or when your computer is stolen). But I only focus on PC than server, because it's on which that I believe most people use protonmail. |
I completely agree with you regarding the different directory locations: that host-wide services should use The question is whether However, for people that are running protonmail as an unprivileged user on a shared instance, and still trust the sysadmin enough not to peek at their secrets, the user-based directories seem to be the better option. Although we can create user unit files with systemd, as in the latter case, packaging these up doesn't make sense: firstly, the user unit file must contain the user name, and secondly we'd have to install these service files to all users on the system. That's a no-go. We can instead provide documentation on how to set up unit files for these users. However, we can accommodate both kinds of user in the directory layout by:
And maybe we can go wild and support a manual override of config and data locations as command-line arguments, for people that consider themselves to be special edge cases. |
Sorry for the late reply!
That's not quite true. If it's a user unit, it inherits that user's namespace. That is, since hydroxide by far officially store secrets in
Not really make a difference either. For system-wide service, we need
Agreed. We can provide both which is similar to the solution applied in https://src.fedoraproject.org/rpms/clash/tree/master |
I'd prefer the systemd service files to be located in a We should probably change the config/state files location defaults, but let's discuss this in #122. |
Another note: I'm not sure it's a good idea to have separate service files for SMTP, IMAP and WebDAV. Event processing won't work correctly IIRC if multiple services are run at the same time. What's the plan for letting users run |
Use u sddm - "Simple Desktop Display Manager" /var/lib/sddm
m sddm video So it's pretty simple to adapt it to this thing. On the user/system wide install, I'm also going for the per-user services (it's my current setup) and as of |
I think it would make sense to make a user service instead an root service. |
Revisiting this, I agree with the sentiment to provide a user service alongside a root service. I didn't originally consider a user service file stored in a system-wide location as an option! However I'm afraid to say that I'm now moving away from ProtonMail, and so I don't have particular motivation to complete this PR - I only have so much time in the day 😢. If somebody would like to fork my changes and modify the user service file, they can feel free to do so. Certainly |
No problem, thanks for this initial work! |
Adds systemd service files for IMAP, SMTP, and CardDAV that limits the permissions of hydroxide for security.
Runs the program as user
hydroxide
, grouphydroxide
.Expects
$HOME
to be at/var/lib/hydroxide
Resolves #120.
Feedback welcome on how best to ensure that this user and directory is automatically generated when a package is installed. We also might want to consider how we could make the setup process more seamless so that users don't have to create the hydroxide user and group, and then run
hydroxide auth
as that user, before running the service.