linuxserver / docker-jellyfin

GNU General Public License v3.0
630 stars 94 forks source link

Warning message is being triggered for 'other' permissions #123

Closed tdaitx closed 2 years ago

tdaitx commented 3 years ago

name: Bug report about: Checking wrong owner's permissions


linuxserver.io


Expected Behavior

Comparison should be done on group permissions.

Current Behavior

Comparison is being done on other permissions, triggering a false warning.

There is a small typo/error in /root/etc/cont-init.d/40-gid-video#L16: cut is being used in the range 8-9 which are the rw permissions for other, to look at rw permissions for group it should instead use range 5-6.

Steps to Reproduce

  1. Compose a jellyfin with /dev/dri
  2. Look docker's output/logs for the warning about missing groups write/read permissions on the /dev/dri devices

Environment

OS: Debian 10 (Buster) CPU architecture: x86_64 How docker service was installed: composer on portainer using ghcr.io/linuxserver/jellyfin

Command used to create docker container (run/create/compose/screenshot)

version: "2.1"
services:
  jellyfin:
    image: ghcr.io/linuxserver/jellyfin
    container_name: jellyfin
    environment:
      - PUID=1000
      - PGID=1001
      - TZ=UTC
    volumes:
      - /srv/configs/jellybin:/config
      - /srv/media/series:/data/tvshows
    devices:
      - /dev/dri:/dev/dri
    restart: unless-stopped

Docker logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 01-envfile: executing... 
[cont-init.d] 01-envfile: exited 0.
[cont-init.d] 10-adduser: executing... 

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/

Brought to you by linuxserver.io
-------------------------------------

To support the app dev(s) visit:
Jellyfin: https://opencollective.com/jellyfin

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    1001
User gid:    1000
-------------------------------------

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing... 
[cont-init.d] 30-config: exited 0.
[cont-init.d] 40-gid-video: executing... 
**** The device /dev/dri/renderD128 does not have group read/write permissions, which might prevent hardware transcode from functioning correctly. To fix it, you can run the following on your docker host: ****
sudo chmod g+rw /dev/dri/renderD128

**** The device /dev/dri/card0 does not have group read/write permissions, which might prevent hardware transcode from functioning correctly. To fix it, you can run the following on your docker host: ****
sudo chmod g+rw /dev/dri/card0

[cont-init.d] 40-gid-video: exited 0.
<snipped>

On host:

$ ls -la /dev/dri/
total 0
drwxr-xr-x  3 root root        100 Jul  8 05:01 .
drwxr-xr-x 18 root root       3800 Jul 28 05:18 ..
drwxr-xr-x  2 root root         80 Jul  8 05:01 by-path
crw-rw----  1 root video  226,   0 Jul  8 05:01 card0
crw-rw----  1 root render 226, 128 Jul  8 05:01 renderD128

On instance:

$ docker exec 7c803e38e209 ls -la /dev/dri/
total 0
drwxr-xr-x 2 root root                80 Aug  8 23:20 .
drwxr-xr-x 6 root root               360 Aug  8 23:20 ..
crw-rw---- 1 root video         226,   0 Aug  8 23:20 card0
crw-rw---- 1 root videoWGLe1qI8 226, 128 Aug  8 23:20 renderD128
github-actions[bot] commented 3 years ago

Thanks for opening your first issue here! Be sure to follow the bug or feature issue templates!

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.