I've seen several sudo commands that begin as so:
sudo -Hu apache
What is the purpose of the -Hu argument, and how does it pertain to the apache
command that follows?
I've seen several sudo commands that begin as so:
sudo -Hu apache
What is the purpose of the -Hu argument, and how does it pertain to the apache
command that follows?
sets $HOME to the apache user's home directory, and executes whatever would follow sudo -Hu apache as the apache user.
Ex: sudo -Hu apache ls ~ would execute ls ~ as the apache user with $HOME set to the apache user's home, listing apache's home directory contents