68
you are viewing a single comment's thread
view the rest of the comments
[-] lemmyvore@feddit.nl 3 points 1 year ago

So what? If I mount / in the container and choose to run it as root that's my business. Why would the containerization engine second-guess what I'm doing?

How would you like it if sudo told you "I can't let you be root, you could read and write anything you like, including password databases and /etc/sudo"?

[-] TechAdmin@lemmy.world 9 points 1 year ago

Nothing to stop running podman containers with full root access by creating & running them as root, you run them as whatever user you want. I've done it to troubleshoot containers on more than one occasion, usually when I want to play with VPN or privileged ports but too lazy to do it proper. The end goal for a lot of ppl, including myself, is to run as many things as non-root as possible. Why? Best practices around security have you give a service the minimal access & resources it needs to do it's tasks. Some people allow traffic from the internet to their containers & they probably feel a little bit safer running those programs as non-root since it can create an extra layer that may need to be broken to fully compromise a system.

[-] IAm_A_Complete_Idiot@sh.itjust.works 4 points 1 year ago* (last edited 1 year ago)

The point is to minimize privilege to the least possible - not to make it impossible to create higher privileged containers. If a container doesn't need to get direct raw hardware access, manage low ports on the host network, etc. then why should I give it root and let it be able to do those things? Mapping it to a user, controlling what resources it has access to, and restricting it's capabilities means that in the event that my container gets compromised, my entire host isn't necessarily screwed.

We're not saying "sudo shouldn't be able to run as root" but that "by default things shouldn't be run with sudo - and you need a compelling reason to swap over when you do"

this post was submitted on 02 Nov 2023
68 points (100.0% liked)

Selfhosted

39893 readers
334 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS