Unable to change user for services

Having issues with your DietPi installation, or, found a bug? Post it here.
TheSubaruJunkie
Posts: 5
Joined: Thu Mar 19, 2020 6:00 pm

Unable to change user for services

Post by TheSubaruJunkie »

I am running Deluge and by default it runs under the user "debian-deluged" however i need it to run under the "dietpi" user.

No matter what I do it always uses the user "debian-deluged". I have edited the deluged.service and deluge.service.d/dietpi-services_edit.conf files and they both specify user=DietPi however when the service runs it still shows running under "debian-deluged" user.

Why wont dietpi let me change users for services?
Last edited by TheSubaruJunkie on Thu Mar 19, 2020 6:20 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 2275
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change user for services

Post by Joulinar »

Hi,

why are you need to have deluged running as dietpi user?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TheSubaruJunkie
Posts: 5
Joined: Thu Mar 19, 2020 6:00 pm

Re: Unable to change user for services

Post by TheSubaruJunkie »

Because my hard drive is FAT32 and does not support permissions. So i have mounted it with DIETPI as the owner. Deluge can not write to the drive because it doesn't have the permission to do so. So I need to run Deluge as Dietpi so that it has permission to write to my FAT32 drive.
User avatar
Joulinar
Posts: 2275
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change user for services

Post by Joulinar »

better option would be to add Deluge user to DietPi group
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TheSubaruJunkie
Posts: 5
Joined: Thu Mar 19, 2020 6:00 pm

Re: Unable to change user for services

Post by TheSubaruJunkie »

Care to explain how?
User avatar
Joulinar
Posts: 2275
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change user for services

Post by Joulinar »

Code: Select all

usermod -a -G dietpi username
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TheSubaruJunkie
Posts: 5
Joined: Thu Mar 19, 2020 6:00 pm

Re: Unable to change user for services

Post by TheSubaruJunkie »

Okay I did that but it didn't fix anything. Deluge still can not download to the hard drive.

Can you tell me how to change the user for this service? Why does this work on every other distro but DietPi??

I need Deluge to run as DietPi!
User avatar
Joulinar
Posts: 2275
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change user for services

Post by Joulinar »

Did you reboot your system after you added Deluge user to dietpi group?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
TheSubaruJunkie
Posts: 5
Joined: Thu Mar 19, 2020 6:00 pm

Re: Unable to change user for services

Post by TheSubaruJunkie »

Joulinar wrote: Thu Mar 19, 2020 7:36 pm Did you reboot your system after you added Deluge user to dietpi group?
Yes of course I did.
User avatar
Joulinar
Posts: 2275
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to change user for services

Post by Joulinar »

Hi,

are you sure your stick was mounted as dietpi user? because if I add an USB stick, it will be mounted as root user. And did you tried to format your USB drive as ext4?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply