79087242

Date: 2024-10-14 18:06:43
Score: 1
Natty:
Report link

This problem arises from using a different version of python to pip install source rather than the version that is owned by root and has its setuid bit set. It comes from not understanding what python -m pip install -e . does, which is to set up the dependencies for the version of python used by the source in a directory (in the example, ~/SaltSource/3006.9/salt). The solution is to install the version of python which will be used for the source, run python -m pip install -e . and THEN change the owner/group of the installed python version (in the case of the example given, ~/.pyenv/versions/3.10.15/bin/python3.10) to root and set its setuid bit. As mentioned by @dan1st, the original question did not mention the fact that the python version must run as root, so I am amending it to make this clear.

Reasons:
  • Whitelisted phrase (-1): solution is
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @dan1st
  • Self-answer (0.5):
  • Single line (0.5):
  • Low reputation (1):
Posted by: dnessett