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

WIP: ENHANCEMENT - YouTubeDL-Material - add UID/GID env options #598

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

bcurran3
Copy link
Contributor

@bcurran3 bcurran3 commented Aug 21, 2022

What this PR does / why we need it:

YouTubeDL-Material - add UID/GID env options

Not sure if the container supported this when I first added this to AN, but it does now. I left the defaults for UID/GID at the dev's defaults but now they can be overwridden.

Which issue (if any) this PR fixes:

Fixes #

Any other useful info:

I've had no success setting it to run as root:

WARNING! Could not change directory ownership. If you manage permissions externally this is fine, otherwise you may experience issues when downloading or deleting videos.
error: failed switching to " 0: 0": unable to find user 0: no matching entries in passwd file
find: ' 0' is not the name of a known user

It says "this is fine" but the container reboots. I have not tried setting to other UID's or GUD's, but now the option is there to play with. :->

@bcurran3 bcurran3 changed the title ENHANCEMENT - YouTubeDL-Material - add UID/GID env options WIP: ENHANCEMENT - YouTubeDL-Material - add UID/GID env options Aug 21, 2022
Copy link
Owner

@davestephens davestephens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What the dev thinks the uid/gid is not relevant in this context. It needs to be set to either 0 for root, or the uid/gid for the ansible Nas user needs to be calculated and used. Depends on the desired behaviour.

In Ubuntu uid/gid 1000 is the first user added user, ie likely you, which is definitely not the right one.

@@ -9,6 +9,10 @@ youtubedlmaterial_dl_audio_directory: "{{ downloads_root }}/youtube/audio"
youtubedlmaterial_dl_video_directory: "{{ downloads_root }}/youtube/video"
youtubedlmaterial_dl_subscriptions_directory: "{{ downloads_root }}/youtube/subscriptions"

# uid / gid
youtubedlmaterial_user_id: "1000"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't look right to me.

@@ -9,6 +9,10 @@ youtubedlmaterial_dl_audio_directory: "{{ downloads_root }}/youtube/audio"
youtubedlmaterial_dl_video_directory: "{{ downloads_root }}/youtube/video"
youtubedlmaterial_dl_subscriptions_directory: "{{ downloads_root }}/youtube/subscriptions"

# uid / gid
youtubedlmaterial_user_id: "1000"
youtubedlmaterial_group_id: "1000"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or this

@@ -28,6 +28,8 @@
- "{{ youtubedlmaterial_port_http }}:17442"
env:
ALLOW_CONFIG_MUTATIONS: "true"
UID: " {{ youtubedlmaterial_user_id }}"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unintentional whitespace next to the uid/gid opening quotes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants