YoutubeDL-Material: [BUG] youtube-dl doesn't have exec perms in latest nightly build

Describe the bug /app/node_modules/youtube-dl/bin/youtube-dl is missing exec perms as of 99c5cf5, causing downloads to fail with:

Error while retrieving info on video with URL <URL REDACTED> with the following message: Error: Command failed with EACCES: node_modules/youtube-dl/bin/youtube-dl -o audio/%(title)s.%(ext)s --write-info-json --audio-quality 0 -x --audio-format mp3 --write-thumbnail --no-clean-info-json -j --dump-json <URL REDACTED> spawn node_modules/youtube-dl/bin/youtube-dl EACCES

I haven’t traced the root cause back to a particular change yet, but I can confirm that the exec perm is added in the v4.3.2 tag, and downloads work as expected.

To Reproduce Steps to reproduce the behavior:

  1. Set your Docker image to tzahi12345/youtubedl-material:nightly.
  2. Attempt to download YouTube video.

Expected behavior The youtube-dl program should have executable permissions, allowing YouTube videos to be downloaded.

Environment

PLEASE NOTE my UID/GID below…

docker-compose.yml:

 ytdl-material:
    image: tzahi12345/youtubedl-material:nightly
    container_name: ytdl-material
    environment:
      UID: "99"
      GID: "100"
      ALLOW_CONFIG_MUTATIONS: "true"

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 5
  • Comments: 18 (1 by maintainers)

Most upvoted comments

you can run: chmod a+x /app/node_modules/youtube-dl/bin/youtube-dl in a docker shell and add the execute permissions for now until it is fixed in the build

So since this has been open for a while and I had restarted this docker so often lately…

Add && sleep 8 && docker exec [container_name] chmod a+x /app/node_modules/youtube-dl/bin/youtube-dl to the post arguments in Unraid or modify your docker setup accordingly.

Or a more complex command but will only wait as long as needed && docker exec [container_name] sh -c 'while [ ! -f /app/node_modules/youtube-dl/bin/youtube-dl ]; do sleep 1; done; chmod a+x /app/node_modules/youtube-dl/bin/youtube-dl'

Updated: Just a quick edit of the complex string to make it stop after 30 seconds if nothing is found. Seemed like a better idea than letting it loop forever… docker exec [container_name] sh -c 'count=0; max_count=30; while [ ! -f /app/node_modules/youtube-dl/bin/youtube-dl ] && [ $count -lt $max_count ]; do sleep 1; count=$((count+1)); done; if [ -f /app/node_modules/youtube-dl/bin/youtube-dl ]; then chmod a+x /app/node_modules/youtube-dl/bin/youtube-dl; fi'

Should be fixed with the latest nightly now. If not I’ll reopen, thanks!

So you had mounting issue rather than application issue, check your mounting again. And not this kind of topic.