Permission denied for curl command

16,354

you are either in a write protected directory or the file is write protected.

Try:

ls -l miamiweather.txt

to see if the file is write protected.

Try

cd

to get to your home directory and then try the curl command again.

Share:
16,354
user3277533
Author by

user3277533

Updated on June 04, 2022

Comments

  • user3277533
    user3277533 almost 2 years

    I'm working through this book for grad school (see URL below) and I've gotten to the part on curl programs.

    I'm supposed to enter this command and have a txt file of 30 days of miami weather.

    curl "http://www.wunderground.com/history/airport/MIA/1992/08/[01-30]/DailyHistory.html?&format=1" >> miamiweather.txt 
    

    Instead I get

    -bash: miamiweather.tx: Permission denied
    

    I am very new to mac, so I think it may be an issue with the permission. This book was made before the maverick update, so could there be something in the update that interferes with the curl command? I've checked apple help pages and forums to no avail.

    Edit: forgot the book url http://www.amazon.com/Practical-Computing-Biologists-Steven-Haddock/dp/0878933913

    Edit: I did not cd into a directory. I was creating the file in my home directory.