Score:0

Ubuntu 20.04 permissions inherited from group

cm flag

I've really tried to find the solution everywhere, but still don't get it.

I'm running Ubuntu 20.04.3 LTS. I want transmission, plex, sonarr and radarr to access folders to be able to download files. For this I've decided to add all these users to a group called 'htpc'.

htpc@htpc:~$ getent group htpc
htpc:x:1000:root,www-data,sonarr,radarr,plex,debian-transmission

I have /media/hdd2/Filmek folder owned by htpc:htpc (user/group).

htpc@htpc:~$ ls -la /media/hdd2/
total 88
drwxrwsrwx+  14 htpc                htpc                 4096 Aug 24 14:57  .
drwxr-xr-x    7 debian-transmission debian-transmission  4096 Aug  1 11:01  ..
drwxrwsrwx+   3 htpc                htpc                 4096 Aug  1 09:41  Downloads
drwxrwsr-x+ 112 htpc                htpc                20480 Jul 25 13:25  Filmek
drwxrwsrwx+   3 htpc                htpc                 4096 Sep 29  2019  Kids
drwxrwsrwx+   2 htpc                htpc                16384 Jun  2  2019  lost+found
-rwxrwxrwx+   1 htpc                htpc                 1632 Nov  7  2019  lovelace.yaml
drwxrwsrwx   11 htpc                htpc                 4096 Sep  7 17:34  Osmo
drwxr-sr-x    3 www-data            htpc                 4096 Aug 24 16:10  owncloud
drwxrwsrwx+   2 htpc                htpc                 4096 Mar 19 18:14  Photos
drwxrwsrwx+   4 htpc                htpc                 4096 Feb 28  2020  Requested
drwxrwsrwx+   3 htpc                htpc                 4096 Nov  4  2019  Stuffs
drwxrwsrwx+  51 htpc                htpc                 4096 Sep  7 17:59 'Szinkronos sorozatok'
drwxrwsrwx+   4 htpc                htpc                 4096 Aug  4  2019  .Trash-1000
drwxrwsrwx+   3 htpc                htpc                 4096 Jun  5  2020  Zene

Doesn't it mean, user 'radarr' should have access to write this folder without any problem?

Still if Radarr tries to import a file, I get this error message:

[v3.2.2.5080] System.UnauthorizedAccessException:
Access to the path '/media/hdd2/Filmek/Friends The Reunion (2021)/Friends.the.Reunion.2021...mkv' is denied.

EDIT

The output of getfacl /media/hdd2/Filmek is:

getfacl: Removing leading '/' from absolute path names   
# file: media/hdd2/Filmek   
# owner: htpc # group: htpc   
# flags: -s- user::rwx group::rwx group:plex:rwx mask::rwx other::r-x 

And the output of getfacl /media/hdd2/Filmek/Friends\ The\ Reunion\ (2021)/ is:

getfacl: Removing leading '/' from absolute path names 
# file: media/hdd2/Filmek/Friends The Reunion (2021)/ 
# owner: htpc 
# group: htpc 
# flags: -s- user::rwx group::rwx other::r-x

And the output of getfacl /media/torrent/Downloads/incomplete/Radarr/Friends.the.Reunion.2021.1080p.HMAX.WEB-DL.DD5.1.H.264.HUN.ENG-PTHD/Friends.the.Reunion.2021.1080p.HMAX.WEB-DL.DD5.1.H.264.HUN.ENG-PTHD.mkv is:

getfacl: Removing leading '/' from absolute path names  
# file: media/torrent/Downloads/incomplete/Radarr/Friends.the.Reunion.2021.1080p.HMAX.WEB-DL.DD5.1.H.264.HUN.ENG-PTHD/Friends.the.Reunion.2021.1080p.HMAX.WEB-DL.DD5.1.H.264.HUN.ENG-PTHD.mkv 
# owner: debian-transmission 
# group: htpc user::rw- group::r-- other::r--
ChanganAuto avatar
us flag
You need to assure your user has permissions to read/write in the destination folders. All the apps are running with your user.
syluccy avatar
cm flag
Radarr is running by user: radarr, transmission is running by user transmission-daemon. Both user are members of group htpc. Isn't this how it supposed to work?
ChanganAuto avatar
us flag
No, it isn't. Again, check the destination folders permissions.
syluccy avatar
cm flag
Okay, so help me out. How should permissions work? I have a library which should be written by application Plex (ran by user plex), application Radarr, (ran by user radarr) application Sonarr (ran by user sonarr). If I chown for plex:plex, then sonarr, radarr won't have permission...
raj avatar
cn flag
raj
1) There is a `+` after the permissions field on both `.` and `Filmek` which means additional access control lists are in affect on these directories. Check if they are not getting in your way by `getfacl <path>`. 2) What are the permissions on folder `/media/hdd2/Filmek/Friends The Reunion (2021)/`, because you wanted to load a file from that folder. And what are the permissions on the file itself?
zx485 avatar
us flag
@syluccy: I merged your two comments with the question. Next time, please do it yourself and do not add additional information as comments, but rather as edits to your question. Thanks.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.