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

DietPi-Software | Transmission: Reinstall can fail in cases #4244

Closed
pioniere opened this issue Apr 4, 2021 · 26 comments
Closed

DietPi-Software | Transmission: Reinstall can fail in cases #4244

pioniere opened this issue Apr 4, 2021 · 26 comments
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Milestone

Comments

@pioniere
Copy link

pioniere commented Apr 4, 2021

Creating a bug report/issue

Required Information

  • DietPi version | cat /boot/dietpi/.version
  • Distro version | echo $G_DISTRO_NAME or cat /etc/debian_version
  • Kernel version | uname -a
  • SBC model | echo $G_HW_MODEL_NAME or (EG: RPi3)
  • Power supply used | (EG: 5V 1A RAVpower)
  • SDcard used | (EG: SanDisk ultra)

Additional Information (if applicable)

  • Software title | (EG: Nextcloud)
  • Was the software title installed freshly or updated/migrated?
  • Can this issue be replicated on a fresh installation of DietPi?
  • Bug report ID | echo $G_HW_UUID

Steps to reproduce

  1. ...
  2. ...

Expected behaviour

  • ...

Actual behaviour

  • ...

Extra details

  • ...

Details:

  • Date | Sun Apr 4 15:56:12 PDT 2021
  • DietPi version | v7.0.2 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Raspbian Lite
  • Hardware | RPi 3 Model B+ (armv7l) (ID=3)
  • Kernel version | Linux DietPi 5.10.17-v7+ #1403 SMP Mon Feb 22 11:29:51 GMT 2021 armv7l GNU/Linux
  • Distro | buster (ID=5,RASPBIAN=1)
  • Command | apt-get -qq --allow-change-held-packages install transmission-daemon
  • Exit code | 100
  • Software title | DietPi-Software

Steps to reproduce:

  1. ...
  2. ...

Expected behaviour:

  • ...

Actual behaviour:

  • ...

Extra details:

  • ...

Additional logs:

Setting up transmission-daemon (2.94-2+deb10u2) ...
chown: invalid group: ‘debian-transmission:debian-transmission’
dpkg: error processing package transmission-daemon (--configure):
 installed transmission-daemon package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 transmission-daemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
@Joulinar
Copy link
Collaborator

Joulinar commented Apr 4, 2021

Hi,

many thanks for your message. Hmm DietPi is doing nothing else than installing transmission-daemon via apt package from global repository. I did a test installation on my RPi3B+ 32bit without issues. Can you try to setup again pls. Maybe do a reboot before.

@pioniere
Copy link
Author

pioniere commented Apr 5, 2021

I did try rebooting and ran setup again, same result.

@Joulinar
Copy link
Collaborator

Joulinar commented Apr 5, 2021

strange, usually debian-transmission user and group should be created by the Debian package. Can you check following to files if a user/group debian-transmission is existing

cat /etc/passwd
cat /etc/group

Found an older issue on reddit. But strange that it is working for me
https://www.reddit.com/r/linuxquestions/comments/7zxtbm/chown_invalid_group/

@MichaIng
Copy link
Owner

I mark this as closed. Feel free to reopen if required.

@LeVraiRoiDHyrule
Copy link

Hi, I'm having the exact same issue

image

I found no way to correctly install transmission.

@Joulinar
Copy link
Collaborator

Joulinar commented Jun 6, 2021

Hi,

There is no real error message shown on your screen print. Pls can you run following

apt update && apt upgrade
apt install transmission-daemon

Plus post the full output. If possible copy the output from SSH session and avoid doing screen prints

@LeVraiRoiDHyrule
Copy link

LeVraiRoiDHyrule commented Jun 6, 2021

When running the apt upgrade, here is what I get:

 dietpi-launcher : All the DietPi programs in one place.
 dietpi-config   : Feature rich configuration tool for your device.
Atteint :3 https://download.docker.com/linux/raspbian buster InRelease
Atteint :4 http://raspbian.raspberrypi.org/raspbian bullseye InRelease
Atteint :5 https://apt.ombi.app/develop jessie InRelease
Atteint :6 https://archive.raspberrypi.org/debian buster InRelease
Atteint :7 https://apt.hrfee.dev trusty InRelease
Atteint :8 https://download.mono-project.com/repo/debian raspbianbuster InRelease
Atteint :9 https://repo.jellyfin.org/debian buster InRelease
Ign :10 https://download.webmin.com/download/repository sarge InRelease
Atteint :11 https://download.webmin.com/download/repository sarge Release
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Tous les paquets sont à jour.
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Calcul de la mise à jour... Fait
0 mis à jour, 0 nouvellement installés, 0 à enlever et 0 non mis à jour.
1 partiellement installés ou enlevés.
Après cette opération, 0 o d'espace disque supplémentaires seront utilisés.
Souhaitez-vous continuer ? [O/n] O
Paramétrage de transmission-daemon (2.94-2+deb10u2) ...
chown: groupe incorrect: « debian-transmission:debian-transmission »
dpkg: erreur de traitement du paquet transmission-daemon (--configure) :
 installed transmission-daemon package post-installation script subprocess returned error exit status 1
Des erreurs ont été rencontrées pendant l'exécution :
 transmission-daemon
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~#

Apparently there is some rests of the transmission installation and the command doesn't succeed to remove them. Looks like an issue with groups/users. But it doesn't tell me which folders have a group issue.
(Also maybe you want me to switch it to English temporatly ?)

Also, I just read your message on the dietpi forum, I'm very sorry for having post on both (I usually do that when I've got an issue for having more answer, but I forgot how quick you were and that it was just adding you more work. sorry again).

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

The postinst script fails. Can you please run the following:

dash -x /var/lib/dpkg/info/transmission-daemon.postinst configure

@LeVraiRoiDHyrule
Copy link

LeVraiRoiDHyrule commented Jun 6, 2021

Thanks for your answer. Here is what I get:

root@DietPi:~# dash -x /var/lib/dpkg/info/transmission-daemon.postinst configure
+ set -e
+ test
+ getent passwd debian-transmission
+ chperms debian-transmission debian-transmission 4750 /var/lib/transmission-daemon/.config/transmission-daemon
+ dpkg-statoverride --list /var/lib/transmission-daemon/.config/transmission-daemon
+ OVERRIDE=
+ [ -e /var/lib/transmission-daemon/.config/transmission-daemon ]
+ chown debian-transmission:debian-transmission /var/lib/transmission-daemon/.config/transmission-daemon
chown: groupe incorrect: « debian-transmission:debian-transmission »
root@DietPi:~#

@Joulinar
Copy link
Collaborator

Joulinar commented Jun 6, 2021

In general there is no need to post the issue twice. This will not speed up things as the same people are on both platform.

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

Hmm, do we remove that group? Let me see. We don't use it anymore, but it shouldn't be removed.
EDIT: We don't

Can you please paste:

getent group debian-transmission

@LeVraiRoiDHyrule
Copy link

Hmm, do we remove that group? Let me see. We don't use it anymore, but it shouldn't be removed.

I have no group called "debian-transmission". But I have a user named like that, do you want me to remove it and try again ?

@LeVraiRoiDHyrule
Copy link

In general there is no need to post the issue twice. This will not speed up things as the same people are on both platform.

I'm very sorry, I won't do that again next time

@LeVraiRoiDHyrule
Copy link

getent group debian-transmission

Done ! (it didn't return anything)

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

Nonono don't remove that user 😄. The opposite: Create the group.

groupadd -r debian-transmission
usermod -aG debian-transmission debian-transmission

@LeVraiRoiDHyrule
Copy link

It's done. I try again ? With dietpi-software or just with apt install ?

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

Just to be sure it's really solved, finish the install first:

apt -f install

@LeVraiRoiDHyrule
Copy link

The install completed without issues.
But I can't access [localip]:9091, I've got a 403 forbidden error.

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

Did you rerun dietpi-software as well?

@LeVraiRoiDHyrule
Copy link

I didn't. But now I did, and it works ! Transmission seems to work perfectly, Thank you !

I think the problem came from my trial at creating a new group for permissions. I have my download folder where both transmission, radarr and sonarr should all be able to read and write, while others can only read. I created a new group called downloadaccess including debian-transmission, radarr and sonarr users.
Is it the correct way ? I probably failed something

@Joulinar
Copy link
Collaborator

Joulinar commented Jun 6, 2021

Usually we use user group dietpi for shared access between multiple apps

@MichaIng
Copy link
Owner

MichaIng commented Jun 6, 2021

Usually we use user group dietpi for shared access between multiple apps

Exactly. I mean there is not issue to create a new group in general to further split permissions, but as in the apparent case, some package installs have issues when their system groups are removed. When the whole user is removed, it is re-created, but it is then often assumed, that when the user exists, that the group exists as well, and then chown commands can fail.

@LeVraiRoiDHyrule
Copy link

Usually we use user group dietpi for shared access between multiple apps

Exactly. I mean there is not issue to create a new group in general to further split permissions, but as in the apparent case, some package installs have issues when their system groups are removed. When the whole user is removed, it is re-created, but it is then often assumed, that when the user exists, that the group exists as well, and then chown commands can fail.

Ah I see. The thing is that I would like to have some custom groups, one for videoaccess (that will contain jellyfin, sonarr, radarr, ombi but without write rights) and one for download access only for transmission, sonarr and radarr with write access

@Joulinar
Copy link
Collaborator

Joulinar commented Jul 14, 2021

another report on the forum https://dietpi.com/phpbb/viewtopic.php?t=9227

@MichaIng
should we created the group in advance?

@MichaIng
Copy link
Owner

I guess it happens on reinstalls only as we removed the group once, and the postinst script checks for the user only, and then expects the group to exist. So this is something that we should add to update patches instead. I'll verify and open a PR then.

@MichaIng MichaIng reopened this Jul 14, 2021
@MichaIng MichaIng added this to the v7.4 milestone Jul 14, 2021
@MichaIng MichaIng changed the title Error trying to install transmission torrent software DietPi-Software | Transmission: Reinstall can fail in cases Jul 14, 2021
MichaIng added a commit that referenced this issue Jul 24, 2021
+ DietPi-Patches | 'Recreating the "debian-transmission" group for the "debian-transmission" user to prevent Transmission package upgrade issues: #4244
@MichaIng
Copy link
Owner

Done with: 14998ff

@MichaIng MichaIng added the Solution available 🥂 Definite solution has been done label Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

4 participants