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

Service "deluged" won't get/set its config files from /var/lib/deluge/.config/deluge but from /root/.config/deluge #31690

Closed
jfcolom opened this issue Jun 28, 2021 · 9 comments · Fixed by #31708

Comments

@jfcolom
Copy link

jfcolom commented Jun 28, 2021

System

  • package:
    *deluge-2.0.3_10

Expected behavior

deluged service should start up with deluge system user, and therefore, get/set its configuration files from /var/lib/deluge/.config/deluge

Actual behavior

It is starts with root and, therefore, it gets/sets the configuration from /root/.config/deluge. As it cannot write there after that, there are some permission errors and it does not start properly.

Workaround

In /etc/sv/deluged/run, replace

exec deluged -d -U deluge -g deluge ${OPTS} 2>&1

by

exec chpst -u deluge:deluge deluged -d -U deluge -g deluge ${OPTS} 2>&1

sgn added a commit to sgn/void-packages that referenced this issue Jun 29, 2021
sgn added a commit to sgn/void-packages that referenced this issue Jun 29, 2021
While we're at it, drop priviledge early.

Fix: void-linux#31690
@sgn
Copy link
Member

sgn commented Jun 29, 2021

I think we can go further to move config to /var/lib/deluge, without .config/deluge part. Please check.

sgn added a commit to sgn/void-packages that referenced this issue Jun 29, 2021
While we're at it, drop priviledge early.

Fix: void-linux#31690
@sgn sgn closed this as completed in 8b3b299 Jul 1, 2021
@jfcolom
Copy link
Author

jfcolom commented Jul 1, 2021

Thanx!

@q66
Copy link
Contributor

q66 commented Aug 5, 2021

this is a bad fix, it broke my use case (i override the user it is started as, with /etc/sv/deluged/conf, but the chpst to unprivileged user means it can't change user on its own later)

@q66
Copy link
Contributor

q66 commented Aug 5, 2021

@sgn the proper fix is to keep things as they were, but pass -c /var/lib/deluge before ${OPTS}

@sgn
Copy link
Member

sgn commented Aug 6, 2021

Maybe this #32357

@sgn sgn reopened this Aug 6, 2021
@sgn
Copy link
Member

sgn commented Aug 8, 2021

Hm, keep things as it were shouldn't work at all deluge-torrent/deluge@d08c3f7

@sgn sgn closed this as completed in 0b4351b Aug 8, 2021
@jfcolom
Copy link
Author

jfcolom commented Aug 18, 2021

deluged is now getting its configuration from /var/lib/deluge/.config instead of /var/lib/deluge/.config/deluge
This breaks deluge-web service or, at any rate creates some inconsistency, as deluge-web gets its configuration from /var/lib/deluge/.config/deluge.

Workaround: in /etc/sv/deluged/run, set the configuration path
exec deluged -d -U deluge -g deluge -c /var/lib/deluge/.config/deluge ${OPTS} 2>&1

Another workaround: do not start deluged service (sv start deluge), but launch deluged process from the web interface offered by deluge-web.

sgn added a commit that referenced this issue Aug 18, 2021
#31690 (comment)

Programming is hard, let's go shopping.
@sgn
Copy link
Member

sgn commented Aug 18, 2021

deluged is now getting its configuration from /var/lib/deluge/.config instead of /var/lib/deluge/.config/deluge
This breaks deluge-web service or, at any rate creates some inconsistency, as deluge-web gets its configuration from /var/lib/deluge/.config/deluge.

Workaround: in /etc/sv/deluged/run, set the configuration path
exec deluged -d -U deluge -g deluge -c /var/lib/deluge/.config/deluge ${OPTS} 2>&1

Fixed, :( programming is hard.
4588318

@jfcolom
Copy link
Author

jfcolom commented Aug 18, 2021

Thanks

Noodlez1232 pushed a commit to Noodlez1232/void-packages that referenced this issue Aug 27, 2021
Noodlez1232 pushed a commit to Noodlez1232/void-packages that referenced this issue Aug 27, 2021
void-linux#31690 (comment)

Programming is hard, let's go shopping.
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 a pull request may close this issue.

3 participants