Giter Club home page Giter Club logo

Comments (9)

Tzahi12345 avatar Tzahi12345 commented on July 24, 2024

Interesting, I think this could be solved by chmodding the node_modules/youtube-dl/bin folder on startup. I can't do much else as I don't have full control over that folder (it's a dependency), but I think that might solve it.

I'm not sure I want to do this in all cases so I might set up an environment variable to control it. Something like YTDL_CUSTOM_UID_GID. If any other problems arise because of a custom uid/gid, I can let the fix use the same environment variable so the environment variables don't add up.

I'll play around with this a bit more and see if I get any solutions to it.

from youtubedl-material.

chimlm avatar chimlm commented on July 24, 2024

For docker image, better practice is to update a dependency in a separate layer rather than changing it inside a running container.

from youtubedl-material.

Tzahi12345 avatar Tzahi12345 commented on July 24, 2024

This issue has been solved thanks to @SuperSandro2000 and @Wonderfall's hard work! Here's the merged PR. You can set the UID/GUID using ENV vars and it should work without issue. Thanks for the bug report!

from youtubedl-material.

robflate avatar robflate commented on July 24, 2024

Sorry, can someone give an example of how to set these ENV vars in docker compose. I've done;

environment:
  - UID=501
  - GUID: 999

but downloads are still owned by root. I also tried GID instead of GUID.

from youtubedl-material.

SuperSandro2000 avatar SuperSandro2000 commented on July 24, 2024

use either

environment:
  UID: 501
  GUID: 999

or

environment:
  - UID=501
  - GUID=999

You cant mix them.

from youtubedl-material.

robflate avatar robflate commented on July 24, 2024

Sorry that was a typo when writing it here. My compose file contains;

youtubedl-material:
    image: tzahi12345/youtubedl-material:latest
    container_name: youtubedl-material
    restart: unless-stopped
    ports:
      - 17442:17442
    volumes:
      - path/to/youtubedl-material/appdata:/app/appdata
      - path/to/youtubedl-material/audio:/app/audio
      - path/to/youtubedl-material/video:/app/video
      - path/to/youtubedl-material/subscriptions:/app/subscriptions
      - path/to/youtubedl-material/users:/app/users
    environment:
      UID: 501
      GUID: 999

All the files downloaded to my bind mount folder are owned by root:root not the user passed in the ENV vars.

from youtubedl-material.

Tzahi12345 avatar Tzahi12345 commented on July 24, 2024

@robflate

I see you're on the latest tag, which is fine! But the fix was only applied on the nightly tag (latest means latest stable, while nightly reflects the current repo and any changes since the last update).

If you change the image tag to nightly and run docker-compose pull, it should work. Lmk how it goes!

from youtubedl-material.

robflate avatar robflate commented on July 24, 2024

Thanks, nightly tag worked. Only other change was I had GUID so changed it to GID.

from youtubedl-material.

Tzahi12345 avatar Tzahi12345 commented on July 24, 2024

Good catch! Missed that one. Glad you got it working :)

from youtubedl-material.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.