10
1
I ran a command to download something with curl
–
sudo curl roots.cx/get | sh
– and it threw a permission denied error. So I did sudo curl
and I got the same error … why is that?
I was able to run the install command without curl
, but I needed to sudo
, so why does curl
not work with sudo
?
3Can you show the full command ? – Ofiris – 2013-02-13T05:28:58.680
Are you sure the website was not returning the "permission denied" error, rather then Perl ? What variant of Linux are you using and is SELinux running ? – davidgo – 2013-02-13T05:44:26.437
@davidgo I'm using OS X for this... – GiH – 2013-02-13T15:44:29.117
@Ofiris
sudo curl roots.cx/get | sh
– GiH – 2013-02-13T15:45:37.043@GiH Try adding a sudo after the pipe – Ofiris – 2013-02-13T17:03:42.090
@Ofiris Thanks that worked! Care to put an answer to the question for why? I don't fully understand why the initial command doesn't work with sudo, but once it is piped it does... just to be clear to anyone who reads this it worked with
curl roots.cx/get | sudo sh
– GiH – 2013-02-13T18:00:23.300@GiH , posted as an answer, will add details soon. – Ofiris – 2013-02-13T19:58:41.910