Restricting access to the "directory view" aka ind

So on my website if you go to www.example.com/directory/ it will spit out the directory structure rather than displaying a forbidden or gracefully forwarding to a different page.

Is this due to the file permissions on the directory? If so what chmod/permission settings should be used?

Thanks

2 Replies

It's a feature of the web server, how to disable it depends on which web server you're using. Google "[your webserver] disable directory index".

If you're lazy and don't feel like mucking about with the Web server and only want to restrict a couple directories (like I do), you can always touch index.html and just serve up some white.

Probably better to turn it off in the Web server, though.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct