Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PUID & PGID have not worked for some time. Changing to original PLEX labels works. #390

Closed
1 task done
MrCee opened this issue Mar 9, 2024 · 5 comments
Closed
1 task done

Comments

@MrCee
Copy link

MrCee commented Mar 9, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Setting the PUID and the GUID has not worked for some time, I think I actially moved away from Linuxserver.io because I couldn't delete files from the Plex interface even though:

id plex >
uid=1031(plex) gid=65536(sc-automedia)

PUID=1031
PGID= 65536

I have my media folders owned by plex:sc-automedia with permissions 775.

The values for the labels don't really work with the code, because the code is expecting to see PLEX_UID and PLEX_GID when deleting files..

Expected Behavior

- PUID=1031 # does not work as suggested on linuxserver

- PGID=65536 # does not work as suggested on linuxserver

Steps To Reproduce

If we use the original Plex labels in docker commands or compose files, everything runs perfectly.
- PLEX_UID=1031 #original PMS will work fine with folder permissions and
- PLEX_GID=65536 # use these working labels instead

Environment

- OS:Synology DSM, 
- How docker service was installed: Docker Compose

CPU architecture

x86-64

Docker creation

services:
  plex:
    image: lscr.io/linuxserver/plex:latest
    container_name: plex
    environment:
      - TZ=Australia/Sydney
      - VERSION=latest
#      - PUID=1031   # does not work as usggested on linuxserver
#      - PGID=65536  # does not work as suggested on linuxserver
      - PLEX_UID=1031
      - PLEX_GID=65536
      - HOSTNAME="myplex.myserver.me"
      - PLEX_CLAIM=xxx
      - SERVER_IP=xxx.xxx.xxx.xxx
      - LOCAL_NETWORK=xxx.xxx.xxx.xxx/24
      - ports="32400:32400"
    volumes:
      - /volume1/docker/plex/config:/config
      - /tmp/plex:/transcode
      - /volume1/video:/volume1/video
      - /volume1/music:/volume1/music
      - /volume1/radio:/volume1/radio
    image: plexinc/pms-docker:latest
    devices:
      - /dev/dri:/dev/dri
    network_mode: host
    restart: unless-stopped

Container logs

I didn't dig through the logs because changing the labels obviously works with all the permissions I have had set for years.
Copy link

github-actions bot commented Mar 9, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@Roxedus
Copy link
Member

Roxedus commented Mar 9, 2024

Logs is important. post logs from a restart of the container, with PUID and PGID set.

@MrCee
Copy link
Author

MrCee commented Mar 9, 2024

I thongs the logs would be more detailed this, not seeing where to increase verbosity or container logs which begin with the ascii logo. using docker logs -f plex
Running on Synology Docker..

[+] Running 1/1r:/docker/plex# 
 ⠿ Container plex  Created                                                                                                                       0.1s
Attaching to plex
plex  | [s6-init] making user provided files available at /var/run/s6/etc...exited 0.
plex  | [s6-init] ensuring user provided files have correct perms...exited 0.
plex  | [fix-attrs.d] applying ownership & permissions fixes...
plex  | [fix-attrs.d] done.
plex  | [cont-init.d] executing container initialization scripts...
plex  | [cont-init.d] 40-plex-first-run: executing... 
plex  | Plex Media Server first run setup complete
plex  | [cont-init.d] 40-plex-first-run: exited 0.
plex  | [cont-init.d] 45-plex-hw-transcode-and-connected-tuner: executing... 
plex  | [cont-init.d] 45-plex-hw-transcode-and-connected-tuner: exited 0.
plex  | [cont-init.d] 50-plex-update: executing... 
plex  | [cont-init.d] 50-plex-update: exited 0.
plex  | [cont-init.d] done.
plex  | [services.d] starting services
plex  | Starting Plex Media Server.
plex  | [services.d] done.
plex  | Critical: libusb_init failed

@MrCee MrCee closed this as completed Mar 9, 2024
@aptalca
Copy link
Member

aptalca commented Mar 9, 2024

Those logs are not from our image.

The compose yaml you posted above includes duplicate image settings, one pointing to ours, one pointing to Plex's. Those are the settings you need to fix.

@MrCee
Copy link
Author

MrCee commented Mar 9, 2024

Aha! Sorry I didn't see this late last night, I have removed the duplicate image, and all is working well again....

docker logs -f plex
[migrations] started
[migrations] no migrations found
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

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

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1031
User GID:    65536
───────────────────────────────────────

Setting permissions on /transcode
**** Server already claimed ****
**** creating video group videopqrq with id 937 ****
**** adding /dev/dri/renderD128 to video group videopqrq with id 937 ****
**** permissions for /dev/dri/card0 are good ****
Docker is used for versioning skip update check
[custom-init] No custom files found, skipping...
Starting Plex Media Server. . . (you can ignore the libusb_init error)
[ls.io-init] done.
Critical: libusb_init failed

@MrCee MrCee reopened this Mar 9, 2024
@MrCee MrCee closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants