Permission denied
vuh95 opened this issue · comments
You do not need to run wget as root (You should never do that) but instead run bash as root.
Wrong: sudo wget [...] && bash [...]
Correct: wget [...] && sudo bash [...]
Further Explanation:
You run two separate commands and concat them with &&
so sudo
is not used for the whole line, but only for next command. Your &&
does run the right command only if the left command returns 0
or true
.
More Explanation: https://stackoverflow.com/questions/4510640/what-is-the-purpose-of-in-a-shell-command
No, as it depends on the particular environment. Plenty of VPS providers provide root accounts by default.
You do not need to run wget as root (You should never do that) but instead run bash as root.
Wrong:
sudo wget [...] && bash [...]
Correct:wget [...] && sudo bash [...]
Further Explanation: You run two separate commands and concat them with
&&
sosudo
is not used for the whole line, but only for next command. Your&&
does run the right command only if the left command returns0
ortrue
. More Explanation: https://stackoverflow.com/questions/4510640/what-is-the-purpose-of-in-a-shell-command
Thank you so much for your kind response.
I can run the script now.