I'm trying to download some images from an asset folder of a site, that folder happens to be forbidden.

I've tried various suggestions online including a referrer flag for google.com and setting the user agent (both simple and verbose) but still the 403 remains.

I can access the image directly if I give wget the full path but was hopeful of finding a workaround so I can fire and forget.

Is this feasible at all?

The most simplest for of the command that I'm using is :

wget -r -np -U firefox http://sitename.com/subdir/forbiddenDir

and the response is:

Reusing existing connection to sitename.com:80.
HTTP request sent, awaiting response... 403 Forbidden
2016-03-01 22:26:41 ERROR 403: Forbidden.

curl yields similar response.

thanks in advance

closed as off-topic by user79743, Zelda, garethTheRed, Jakuje, Jenny D Mar 2 '16 at 11:38

  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Can you share what kind of image paths worked with wget, and when you say download some images from an asset folder, how do you decide which images to download, for example if images end in a certain number and you want to download number range 1 to 10, or some other pattern? – clarity123 Mar 1 '16 at 22:42
  • @user454038 hello, i know the exact filenames that I'm looking for but it'd also be great to just scoop up the whole dir and its contents. ideally the pattern would be .* within that fodder :) – null Mar 1 '16 at 23:00
  • 3
    I'm voting to close this question as off-topic because is about web server permissions, not linux-unix permissions. – user79743 Mar 2 '16 at 5:21
  • 1
    @BinaryZebra isn't it also about the correct options to use within a tool such as wget or curl? In which case it remains on-topic for U&L – roaima Mar 2 '16 at 10:46
  • 2
    I'm voting to close it because it's about getting access to something that the owner of the website has denied you. Breaking through the permissions deliberately set by the site owner is not something Unix & Linux should help with. – Jenny D Mar 2 '16 at 11:38

What you are trying to do is to list directory contents of forbiddenDir.

If the server does not allow listing contents of a particular directory, then you get 403.14 Directory listing denied error.

The answer is: no, you can't.

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