Skip to content

Add support for skipping the permission enforcement #41

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

Closed
wants to merge 1 commit into from

Conversation

farcaller
Copy link

This adds QBT_IGNORE_PERMISSIONS to skip all the permission verification features of the entrypoint, mostly so that's it's usable in the restricted containers.

Comment on lines +63 to +65
understand what and why you're doing**. This allows qBittorrent-nox to run
in the environments where the user id is enforced outside of the
container.
Copy link
Member

Choose a reason for hiding this comment

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

"the user id is enforced outside of the container" what does it mean? Could you elaborate?

Copy link
Author

Choose a reason for hiding this comment

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

e.g. with a following security context in kubernetes:

securityContext:
  runAsUser: 1000
  runAsGroup: 1000
  allowPrivilegeEscalation: false
  readOnlyRootFilesystem: true

qBitTorrent will be started as 1000:1000, and you won't be able to call doas, or, most probably, chown the files.

Copy link
Member

@Chocobo1 Chocobo1 May 31, 2024

Choose a reason for hiding this comment

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

qBitTorrent will be started as 1000:1000, and you won't be able to call doas, or, most probably, chown the files.

I see. But as you can see, it is supposed to be the container job to lower the privileges (run as non-root user) or at least this is the designated usage.
Docker also has similar directives: https://docs.docker.com/reference/dockerfile/#user but it is not supposed to be used when using this image. Our readme/manual has given exact steps of how to run it.

So you shouldn't use these security contexts in kubernetes when running this image, or are you not able to disable them?

@Chocobo1
Copy link
Member

Another question: If you strip all these functions then it is not too different than merely executing the binary directly. Are there still advantages of using docker container in this case?

@farcaller
Copy link
Author

Another question: If you strip all these functions then it is not too different than merely executing the binary directly. Are there still advantages of using docker container in this case?

It still does the initial config bits, so I think it's somewhat more useful than just overriding the entrypoint.

@Chocobo1
Copy link
Member

#41 (comment)

@Chocobo1 Chocobo1 closed this Jun 15, 2024
@Chocobo1
Copy link
Member

Chocobo1 commented Dec 1, 2024

Done in 19e0318.

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.

2 participants