Re:Path Isn't Real on Linux
by LegionMammal978 on Tuesday April 29, 2025 @08:33PM
(#43839804)
One thing I was surprised to learn a couple years ago is that users and groups aren't really tracked much by the Linux kernel: they're just numeric IDs that track process and file ownership. So if you setuid() to a user ID that doesn't exist in /etc/passwd or anywhere else, the kernel won't stop you.
[ Parent
| on HN ]
If I have a file on machineA with uid10001 and I copy the file to machineB, I might want it to retain that uid, but it shouldn't matter to machineB that it doesn't map to a real user.
Hopefully that user actually doesn’t exist on the second machine!
You’ll see this observation all the time building containers.
Re:Path Isn't Real on Linux
by danielrico on Tuesday April 29, 2025 @10:28PM
(#43840583)
Don't if you only run them with root user.
or with ipa-esque authentication schemes and shared mounts