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

Permission issues on firs run in Unraid #1148

Open
1 of 4 tasks
ScribbleGhost opened this issue Jan 5, 2025 · 4 comments
Open
1 of 4 tasks

Permission issues on firs run in Unraid #1148

ScribbleGhost opened this issue Jan 5, 2025 · 4 comments

Comments

@ScribbleGhost
Copy link

ScribbleGhost commented Jan 5, 2025

Description

Upon running a dry-run I get a permission denied error.

Steps to Reproduce

  1. Install ytdl-sub (headless) from the Community Applications in Unraid and set the download locations to one of your Unraid shares. Like for example /mnt/user/nova/ytld-sub/tv_shows.
  2. Start ytdl-sub.
  3. Use SSH to enter the docker console with docker exec -it ytdl-sub /bin/bash.
  4. Run su abc -s /bin/bash as advised in the docs.
  5. Check that you are indeed running as the abc with the whoami command.
  6. Do a dry-run with ytdl-sub --dry-run sub /config/subscriptions.yaml -o '--ytdl_options.max_downloads 3'
  7. Get the error below:

Expected Behavior

I would expect the dry-run to not get permission errors.

Actual Behavior

I get permission errors instead.

Screenshots or Logs

2025-01-05T12-23-41

2025-01-05_11-28-00

root@nova:/mnt/user/nova# docker exec -it ytdl-sub /bin/bash
root@b9b6ba40738e:/# su abc -s /bin/bash
abc@b9b6ba40738e:/$ whoami
abc
abc@b9b6ba40738e:/$ ytdl-sub --dry-run sub /config/subscriptions.yaml -o '--ytdl_options.max_downloads 3'
[ytdl-sub] No config specified, using defaults.
[ytdl-sub] Validating subscriptions...
[ytdl-sub] Beginning subscription dry run for NOVA PBS
[ytdl-sub] The following error occurred for the subscription NOVA PBS:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for National Geographic
[ytdl-sub] The following error occurred for the subscription National Geographic:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Cosmos - What If
[ytdl-sub] The following error occurred for the subscription Cosmos - What If:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Jake Trains
[ytdl-sub] The following error occurred for the subscription Jake Trains:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Kids Toys Play
[ytdl-sub] The following error occurred for the subscription Kids Toys Play:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Rick Beato
[ytdl-sub] The following error occurred for the subscription Rick Beato:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for BBC News
[ytdl-sub] The following error occurred for the subscription BBC News:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Thelonious Monk
[ytdl-sub] The following error occurred for the subscription Thelonious Monk:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Game Chops
[ytdl-sub] The following error occurred for the subscription Game Chops:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for UKNOWY
[ytdl-sub] The following error occurred for the subscription UKNOWY:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Lazerdiscs Records
[ytdl-sub] The following error occurred for the subscription Lazerdiscs Records:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Earmake
[ytdl-sub] The following error occurred for the subscription Earmake:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Emily Hopkins
[ytdl-sub] The following error occurred for the subscription Emily Hopkins:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Rick Astley
[ytdl-sub] The following error occurred for the subscription Rick Astley:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub] Beginning subscription dry run for Michael Jackson
[ytdl-sub] The following error occurred for the subscription Michael Jackson:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 215, in makedirs
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory'
[ytdl-sub]
No files changed for NOVA PBS
[ytdl-sub]
No files changed for National Geographic
[ytdl-sub]
No files changed for Cosmos - What If
[ytdl-sub]
No files changed for Jake Trains
[ytdl-sub]
No files changed for Kids Toys Play
[ytdl-sub]
No files changed for Rick Beato
[ytdl-sub]
No files changed for BBC News
[ytdl-sub]
No files changed for Thelonious Monk
[ytdl-sub]
No files changed for Game Chops
[ytdl-sub]
No files changed for UKNOWY
[ytdl-sub]
No files changed for Lazerdiscs Records
[ytdl-sub]
No files changed for Earmake
[ytdl-sub]
No files changed for Emily Hopkins
[ytdl-sub]
No files changed for Rick Astley
[ytdl-sub]
No files changed for Michael Jackson
[ytdl-sub] Download Summary:
NOVA PBS                0 0 0     0 PermissionError
National Geographic     0 0 0     0 PermissionError
Cosmos - What If        0 0 0     0 PermissionError
Jake Trains             0 0 0     0 PermissionError
Kids Toys Play          0 0 0     0 PermissionError
Rick Beato              0 0 0     0 PermissionError
BBC News                0 0 0     0 PermissionError
Thelonious Monk         0 0 0     0 PermissionError
Game Chops              0 0 0     0 PermissionError
UKNOWY                  0 0 0     0 PermissionError
Lazerdiscs Records      0 0 0     0 PermissionError
Earmake                 0 0 0     0 PermissionError
Emily Hopkins           0 0 0     0 PermissionError
Rick Astley             0 0 0     0 PermissionError
Michael Jackson         0 0 0     0 PermissionError
Total: 15               0 0 0     0 Errors

See `/tmp/ytdl-sub.errors07e83_o9` for details on errors.
Consider making a GitHub issue including the uploaded log file.
abc@b9b6ba40738e:/$

Environment

  • Operating System: Unraid 6.12.14
  • Application Version: Latest ytdl-sub version from the community applications. Presumably 2024.12.27.

Severity

  • Critical: Prevents the application from functioning entirely.
  • Major: Significantly impacts functionality but does not stop all operations.
  • Minor: Cosmetic or small issue with minimal impact.
  • Enhancement: Suggestion for improvement.
@jmbannon
Copy link
Owner

jmbannon commented Jan 6, 2025

For LSIO based containers, user id 911 implies the PUID/PGID passed in are incorrect. From what I'm reading, 99/100 seem to be the values needed for Unraid. Are you sure your container ENV vars are indeed set to 99/100?

@ScribbleGhost
Copy link
Author

ScribbleGhost commented Jan 6, 2025

Sorry I am not sure how I got 911. I tried replicating this issue today and this is what I get.
The settings in Unraid are the same as in the attached screenshot in the original post.

root@b9b6ba40738e:/# su abc -s /bin/bash
abc@b9b6ba40738e:/$ whoami
abc
abc@b9b6ba40738e:/$ ytdl-sub --dry-run sub /config/subscriptions.yaml
[ytdl-sub] No config specified, using defaults.
[ytdl-sub] Validating subscriptions...
[ytdl-sub] Beginning subscription dry run for Test channel
[ytdl-sub] The following error occurred for the subscription Test channel:
Traceback (most recent call last):
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 388, in exception_handling
    yield
  File "/usr/lib/python3.12/site-packages/ytdl_sub/cli/entrypoint.py", line 126, in _download_subscriptions_from_yaml_files
    subscription.download(dry_run=dry_run)
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 375, in download
    return self._process_subscription(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 310, in _process_subscription
    with self._subscription_download_context_managers():
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 181, in _subscription_download_context_managers
    self._prepare_working_directory(),
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/contextlib.py", line 137, in __enter__
    return next(self.gen)
           ^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/site-packages/ytdl_sub/subscriptions/subscription_download.py", line 122, in _prepare_working_directory
    os.makedirs(self.working_directory, exist_ok=True)
  File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '.ytdl-sub-working-directory/Test channel'
[ytdl-sub]
No files changed for Test channel
[ytdl-sub] Download Summary:
Test channel     0 0 0     0 PermissionError
Total: 1         0 0 0     0 Error

See `/tmp/ytdl-sub.errorsatg9vqke` for details on errors.
Consider making a GitHub issue including the uploaded log file.
abc@b9b6ba40738e:/$

@ScribbleGhost
Copy link
Author

ScribbleGhost commented Jan 6, 2025

It manages to do its thing if I skip using su abc -s /bin/bash but then again it will set all created folders as owner root and drwxr-xr-x so it is not really a solution.

By the way I am not super savvy with Docker and containers. I just noticed that in Unraid I don't have a user called abc. Is that normal? I mean is it only a user within the container, or is abc a user I should have in my OS?

@jmbannon
Copy link
Owner

jmbannon commented Jan 6, 2025

abc is normal, the LSIO container will set the PUID and PGID of the host OS to this user via ENV variables. Are you able to run id in unraid? That will show you the PUID and PGID of the host system

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

No branches or pull requests

2 participants