You are not logged in.

#1 2016-07-06 12:28:03

JediBrooker
Member
Registered: 2016-07-06
Posts: 3

systemd and permissions

I've got sonarr (plus some other software) installed via AUR and have it enabled in systemd with an edited provider unit to run as my personal user. The 2 directories sonarr uses to run are /var/lib/sonarr and /usr/lib/sonarr and the permissions on these folders are owned by root. However in order to run sonarr as my user I have to chown these folders to my user. Which means every time I update sonarr it changes the ownership of these folders back to root again.
How do i run sonarr (or any program for that matter) as a user but keep these folders owned by root? Is there a better way to do what I'm doing?

Offline

#2 2016-07-06 14:17:56

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,042

Re: systemd and permissions

This may not be the proper way, but why not change the permissions on those foldersdirectories to 0x777 ?   That will give 'others' read, write and execute permissions. Those permissions will also survive an update with a warning.

Edit:  Oh yeah,  Welcome to the Arch Linux forums  big_smile

Last edited by ewaller (2016-07-06 14:18:22)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2016-07-06 14:31:24

JediBrooker
Member
Registered: 2016-07-06
Posts: 3

Re: systemd and permissions

Thanks for the welcome. I'm quite a long time linux user but generally I've always found the solution to my problems from reading other people's problems. I've finally come across an issue that is unique enough to actually ask the question myself. Either that or I lack the knowledge to search for the right topics.

So, is changing the permissions of the directories to 777 safe/wise?

Offline

#4 2016-07-06 14:56:31

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,042

Re: systemd and permissions

TBH, I've no idea what sonarr is.  If the data stored in those directories is sensitive, perhaps it would not be safe.  If those data are not sensitive, and this is not a public system, I so no issues.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2016-07-06 14:58:03

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,436

Re: systemd and permissions

Anything that's writing to /usr at runtime is poorly designed.

Offline

#6 2016-07-06 15:03:36

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 17,042

Re: systemd and permissions

Scimmia wrote:

Anything that's writing to /usr at runtime is poorly designed.

Agreed.  An suggestions for a better path forward?   I'm not a huge fan of my solution.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2016-07-06 15:05:58

Scimmia
Bug Wrangler
Registered: 2012-09-01
Posts: 7,436

Re: systemd and permissions

Unfortunately, I don't. Unless the software has a built-in way to change the dirs it writes to, there's really not much to do AFAIK.

Offline

Board footer

Powered by FluxBB