Replies: 3 comments 1 reply
-
If you think that is a selinux problem look at the audit logs and fix the denials or try to temporarily disable selinux and see if it works then. Also you nfs share is owned by root on the host so this uid will never be mapped into the container and always be shown as nobody |
Beta Was this translation helpful? Give feedback.
-
Well, at least I don't see anything in $ ls -l /media/Adele/19/01\ Daydreamer.flac
-r-xr-xr-x. 1 tpasch nogroup 19787312 Jun 14 2016 '/media/Adele/19/01 Daydreamer.flac'
$ ls -l /media2/Adele
ls: cannot open directory '/media2/Adele': Permission denied Hence, without SELinux, cifs works! But nfs still fails. (I still not understand this completely, as user 'media' is in the 'users' group.) Is there anything you recommend for working around the problem? (Using the (music) files from outside a podman container is (of cource) possible for me.) |
Beta Was this translation helpful? Give feedback.
-
I agree that we should consider the cifs and nfs cases separately. I would like to emphasise that accessing a music collection on a NAS device seems like a common use case for jellyfin to me (and the jellyfin team encourages the use of containers). CIFSWorks without SELinux. However, I have not understood why SELinux interferes. NFS (version 4.1)Problem is not SELinux related. It results from groups not being mapped. However, adjusting the user seems not possible with nfs (at least I haven't found anything on this online).
SolutionBeginning of compose.yml now reads: # https://github.com/containers/podman-compose/issues/166
x-podman:
in_pod: false
services:
jellyfin:
image: docker.io/jellyfin/jellyfin
ports:
- 8096:8096
container_name: jellyfin
user: "1000:100"
userns_mode: keep-id
# Next line leads to:
# Error response from daemon: looking up supplemental groups for container 3ce58bbca0fd9e00873dab537b40a1cdc7f5f2148f3cba2f3a2e91a1587e505b: Unable to find group tpasch: no matching entries in group file
# userns_mode: "keep-id:uid=1000,gid=100"
group_add:
# - keep-groups ? does _not_ work
- users
- media
# https://superuser.com/questions/1862423/share-groups-with-podman-containers
# https://github.com/containers/podman/issues/10166
annotations:
# Next line enables the use of nfs (aanno)
run.oci.keep_original_groups: 1
io.crun.keep_original_groups: 1
# Disabling SELinux makes cifs working (aanno)
security_opt:
- label=disable
<continues as already posted> Inside the container I now observer the following: $ id
uid=1000(media) gid=100(users) groups=100(users),65534(nogroup),1000(media),65534(nogroup)
$ ls -l /media/Adele/19/01\ Daydreamer.flac
-r-xr-xr-x. 1 media nogroup 19787312 Jun 14 2016 '/media/Adele/19/01 Daydreamer.flac'
$ ls -Z /media/Adele/19/01\ Daydreamer.flac
system_u:object_r:cifs_t:s0 '/media/Adele/19/01 Daydreamer.flac'
$ ls -dl /media2/Adele
drwxrwx---. 4 nobody nogroup 4096 Nov 29 2013 /media2/Adele
$ ls -dZ /media2/Adele
system_u:object_r:nfs_t:s0 /media2/Adele
$ ls -l /media2/Adele
total 16
drwxrwx---. 3 nobody nogroup 4096 Jun 6 2016 19
drwxrwx---. 3 nobody nogroup 4096 Jun 6 2016 21
$ ls -l /media2/Adele/19/01\ Daydreamer.flac
-rwxrwx---. 1 nobody nogroup 19787312 Jun 14 2016 '/media2/Adele/19/01 Daydreamer.flac' However, I wonder if it is possible to change my configuration to make cifs work apart from # disabling SELinux makes cifs working!
security_opt:
- label=disable ? |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have the following setup:
/etc/fstab
I'm looking for a sane way to use my music collection from within podman rootless. This is mainly for using jellyfin. I already tried a bunch of options in this podman compose file.
compose.yml
However, when I use a bash inside the container with
podman exec -it jellyfin bash
I observe the following:
Any ideas on this?
Kind regards,
aanno
Beta Was this translation helpful? Give feedback.
All reactions