Changing ownership of many files

ovalcoconut

Dabbler
Joined
Feb 11, 2018
Messages
12
Just a sanity check before I brick something.

I'm running a few jails with transmission, sonarr, lidarr, jackett, etc.
When setting up everything (minus transmission) I had the foresight to add the respective daemon users as 351:351 in each jail to avoid issues with shared files.
Transmission was installed via plugin with the uid:gid being 921:921, different from my new jails. I was not smart enough to create them with 921.

A bandaid fix would be to change the uid:gid of the transmission user,
Code:
pw usermod -n transmission -u 351
pw groupmod -n transmission -g 351

change ownership of relevant files,
Code:
find / -user 921 -exec chown -h 351 {} \;
find / -group 921 -exec chgrp -h 351 {} \;

then restart the jail.

From my current knowledge, this should work. Unless there's a reference to the uid:gid in a config somewhere. I've checked rc.d and rc.conf and both reference the user by name. Would there be any references to uid:gid somewhere, or am I just going about this all wrong?

EDIT:
It worked fine but I forgot to change the group of the user transmission to the new transmission group
pw usermod -transmission -g 351
 
Last edited:

garm

Wizard
Joined
Aug 19, 2017
Messages
1,555
Why not just make transmission member of 921? Changing the service user/group id breaks anything made available for it in the jail
 

ovalcoconut

Dabbler
Joined
Feb 11, 2018
Messages
12
Transmission is already 921, I want to move it to 351. Sonarr is having trouble dealing with files created by transmission in a separate jail.

And what would break? If I change all the files to the new uid then I shouldn't have a problem right? Unless I'm missing something.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
And what would break? If I change all the files to the new uid then I shouldn't have a problem right? Unless I'm missing something.
Snapshots are your friend.

Also with chmod and chown all can be re-done quickly anyway.
 

ovalcoconut

Dabbler
Joined
Feb 11, 2018
Messages
12
wonderful point about snapshots, wish me luck.
 
Top