Skip to content
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

More detail and secure service example #258

Merged
merged 1 commit into from
Mar 14, 2022

Conversation

AHOHNMYC
Copy link
Contributor

service example in readme is cool, but not enough.

Description=mtg - MTProto proxy server - more clean description
Documentation=https://github.com/9seconds/mtg - show link on systemctl status mtg.service
After=network.target - without network mtg is useless
DynamicUser=true - main PR reason. info, docs. By default mtg in this example will start with root rights. It is unacceptable

BTW, спасибо, Серёжа, за рабочий инструмент. Гораздо лучше официального :з

@codecov-commenter
Copy link

Codecov Report

Merging #258 (2ae0101) into master (6da9c2e) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #258   +/-   ##
=======================================
  Coverage   82.67%   82.67%           
=======================================
  Files          68       68           
  Lines        1922     1922           
=======================================
  Hits         1589     1589           
  Misses        231      231           
  Partials      102      102           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6da9c2e...2ae0101. Read the comment docs.

@9seconds
Copy link
Owner

Thanks a lot!

Спасибо большое :) Я 100 лет не заглядывал в доки по systemd, даже не был в курсе про DynamicUser. Искренне надеюсь, что хоть кому-то этот проект и правда помог: значит, все не зря

@9seconds 9seconds merged commit 2cdd66c into 9seconds:master Mar 14, 2022
@arch-btw
Copy link
Contributor

When I add :

DynamicUser=true

I get:

listen tcp 0.0.0.0:300: bind: permission denied

@AHOHNMYC
Copy link
Contributor Author

AHOHNMYC commented Mar 20, 2022

@arch-btw it's probably because of privileged port (ports number <1024). They are unaccessible for non-root users without some magic. DynamicUser is a method to easily drop privileges.

@arch-btw
Copy link
Contributor

@AHOHNMYC

Thank you!
I fixed it with this: #261

But I think maybe your solution is better.

@AHOHNMYC
Copy link
Contributor Author

@arch-btw wow, nice and elegant solution! I can't think of something better 😸

@AHOHNMYC AHOHNMYC deleted the readme-service-edit branch May 29, 2022 15:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants