3 ms·
Look into using ‘sudo’. Sudo is not just for running things as root. It can also be used to allow a web service (Apache+PHP) to call a specific program (git) as
by lesserknowndan 4y ago
Look into using ‘sudo’.
Sudo is not just for running things as root.
It can also be used to allow a web service (Apache+PHP) to call a specific program (git) as a specific user (e.g. nobody).
- quickthrower2 4y agoYou mean “su”?
- chatmasta 4y agosudo -u nobody git pull That said, "nobody" will have its own challenges, like the lack of a $HOME meaning there is no git config file for the user, meaning you'll need to add a bunch of specific arguments to every git command. You might want to create a locked down user just for running git.
- compressedgas 4y agoI heard that sudo due to PAM wasn't a means of dropping privileges.