0

A folder in My Site

  • I use apache web server
  • PHP on the back end
  • apache is running under the user www-data
  • Permission for my folders are 755

When users request a php page all is well, but when they request a folder, they are presented with my code structure, How do I stop this?

1 Answer 1

1
Options -Indexes

httpd wiki with an overview of directory listings

Possible Options in a Directory directive

3
  • Thank you so much, I just added an extra layer of security
    – daRula
    Mar 24, 2019 at 18:25
  • Its not really security. Ideally an attacker has the source code but still cannot exploit. But is does shut off plain ugly auto index. Mar 24, 2019 at 21:08
  • You are very right, I just noticed that a user can request the files in the directories I do not want listed. How do i prevent this?
    – daRula
    Mar 24, 2019 at 21:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .