YoutubeDL-Material icon indicating copy to clipboard operation
YoutubeDL-Material copied to clipboard

[BUG] Container will not be able to run properly non-privileged

Open samip5 opened this issue 6 months ago • 1 comments

Describe the bug

Currently the container will fail to start if it's not running privileged, due to the entrypoint's setup permissions. It needs a way to skip it, and preferably without gosu.

To Reproduce Steps to reproduce the behavior:

  1. Run container as unprivileged on Kubernetes
  2. See that it's unable to run chown due to that nor use gosu as it requires root.
  3. Container unable to start due to operation not permitted errors

Expected behavior I would expect it to work without issue, as it's running as 1000:1000, but that doesn't seem enough.

Screenshots If applicable, add screenshots to help explain your problem.

Environment

  • Docker tag: latest@sha256:2f943d584711cb07c3535b518939fabb2ab90fdd7452d9a9938cd05378468ed9
  • Running on bare-metal k3s Kubernetes, using containerd

Additional context

[entrypoint] setup permission, this may take a while
chown: changing ownership of '.': Operation not permitted
chown: changing ownership of './users': Operation not permitted
chown: changing ownership of './appdata': Operation not permitted
chown: changing ownership of './audio': Operation not permitted
chown: changing ownership of './subscriptions': Operation not permitted
chown: changing ownership of './video': Operation not permitted
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 "1000:1000": operation not permitted

samip5 avatar Feb 16 '24 20:02 samip5