Change services user

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
Deleted User 4661

Change services user

Post by Deleted User 4661 »

This seems like it would be a pretty straight forward one. But I've so far found nothing sifting through old threads.

In the image below is my transmission download directory:
Image

Files owned by dietpi was stuff i had before switching to dietpi.. But stuff i have since grabbed is under user/group root.

How do i change this so everything is dietpi? Or at least i assume that's what i need..

Reason i want this is root seems to have less permissions so i can't go in on my windows machine change names of files I've grabbed or extract them in their place because i don't have write permission to do so.

I've also noticed in my TV Shows folder, Season folders created by Sonarr are done by user "Sonarr" which does not have full permissions so i can't go in and change anything without running into Access Denied errors.

Am i on the right track? Is this actually a samba issue?

Thanking you kindly for any insight you can provide
Attachments
Capture.PNG
Capture.PNG (9.76 KiB) Viewed 2236 times
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Change services user

Post by MichaIng »

The user:group of the downloaded files is defined by the user:group, the transmission daemon service runs as, which is root:root.

You could change that to dietpi:dietpi, but then you also need to adjust the config directory owner.

But before giving instructions to do so, how are you accessing the files from your Windows machine? Do you use Samba, configured via dietpi-drive_manager?
Deleted User 4661

Re: Change services user

Post by Deleted User 4661 »

MichaIng wrote: Sat Sep 22, 2018 8:21 pm The user:group of the downloaded files is defined by the user:group, the transmission daemon service runs as, which is root:root.

You could change that to dietpi:dietpi, but then you also need to adjust the config directory owner.
Sounds like we're on the same page. I know there is a way to change the user for transmission in raspbian but i hate doing these things and making a mess of permissions. Does this sound to you like what i need?

i assume i'll also be changing the user of Sonarr and Radarr as well
MichaIng wrote: Sat Sep 22, 2018 8:21 pmBut before giving instructions to do so, how are you accessing the files from your Windows machine? Do you use Samba, configured via dietpi-drive_manager?
Precisely
Deleted User 4661

Re: Change services user

Post by Deleted User 4661 »

Bump

Still looking for anyone to aid me in this..

I've managed to eventually get transmission stuff downloading as dietpi but now radarr/sonarr are struggling with permissions to work with files from the transmission download directory to the appropriate show/season directory. I just get a lot of this:

"Couldn't import movie, Access to the path is denied"
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: Change services user

Post by MichaIng »

@brendanssound
Sorry that it took so long.
Please try the following:

Edit:
/etc/systemd/system/transmission-daemon.service

Add below [Service]:
User=debian-transmission
Group=dietpi

Edit:
/etc/transmission-daemon/settings.json

Change:
"umask": 7,

Restart service and check if transmission creates new files with transmission-daemon:dietpi and 770 permissions.
Especially the group is needed, not sure if this is the case automatically with service running as this group.

The umask setting alone would be sufficient for sonarr/radarr to access AFAIK. But running transmission as it's default user (precreated on ATP install) makes it a bid more secure.
Post Reply