You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just want to share some pitfalls on installing dnscrypt-proxy for novice users like me, to avoid some frustration, I did not expect to go down the rabbit hole of SELinux while installing today XD.
On OS with SELinux, do not move files to /opt (from within home), copy them. Else they keep the user_home_t security context, when systemd service tries to run the file, it will be AVC denied (only seen in audit log, systemd merely complains "Failed to locate... Permission denied").
Running as non-root:
When running as non-root user, the user needs to have write access on the dnscrypt-proxy folder, in order to update the list files (even if they exist and are writable by the user).
The user also needs execution privilege on the dnscrypt-proxy binary, else it cannot run after the process drops from root privilege.
-service install will set the working directory in the systemd file as the shell's current directory, so run it from within the folder. If invoked from home by using absolute path to dnscrypt-proxy, it will set the working directory to current user's home, which is not accessible by another user.
If using legit certificate (for DoH), might want to set the permission on the private key file so others can't read it.
To still own the files (so I can update them easily) while giving access, I think the simplest way is creating a new user with corresponding login group, and change the folder and the key's owner group as the user's group. It works even though owner (me) is not in the group. Using nobody might not be recommended.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Just want to share some pitfalls on installing dnscrypt-proxy for novice users like me, to avoid some frustration, I did not expect to go down the rabbit hole of SELinux while installing today XD.
user_home_t
security context, when systemd service tries to run the file, it will be AVC denied (only seen in audit log, systemd merely complains "Failed to locate... Permission denied").Running as non-root:
-service install
will set the working directory in the systemd file as the shell's current directory, so run it from within the folder. If invoked from home by using absolute path to dnscrypt-proxy, it will set the working directory to current user's home, which is not accessible by another user.nobody
might not be recommended.Beta Was this translation helpful? Give feedback.
All reactions