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?
This question appears to be off-topic. The users who voted to close gave this specific reason:
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
man
command, that document usage instructions and the available command line options. So please read the fine manualman sudo
. – HBruijn Aug 13 '17 at 6:51