Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I ran a command to download something with curl 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?

share|improve this question
Can you show the full command ? –  Ofiris Feb 13 '13 at 5:28
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 Feb 13 '13 at 5:44
@davidgo I'm using OS X for this... –  GiH Feb 13 '13 at 15:44
@Ofiris sudo curl roots.cx/get | sh –  GiH Feb 13 '13 at 15:45
@GiH Try adding a sudo after the pipe –  Ofiris Feb 13 '13 at 17:03

1 Answer 1

up vote 3 down vote accepted

Use sudo after the pipe:

curl roots.cx/get | sudo sh

the get script involves some installation, requires sudo to run.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.