Should /admin/cli contents be hidden?

Should /admin/cli contents be hidden?

by Christopher King -
Number of replies: 1

On appending "/admin/cli" to the web address of my moodle installation, the contents of the /cli directory are shown.  On appending just "/admin" to the address, the system immediately goes to the moodle login page, which seems a lot better than showing directory contents.  Is the ability to see the contents of /cli by design?  If not, any idea what I may have misconfigured? 

Thanks!

Chris

Average of ratings: -
In reply to Christopher King

Re: Should /admin/cli contents be hidden?

by Stefano Krister -

Hi!
Maybe you found your answer already (but for everyone else).

This seems to be an issue on the server side of your settings.
Indexing (or directory browsing) is on by default.

Hence you'll see the directory by simply going to http://yourservername/admin/cli

I'm not sure how you access (or even have access to) the server side of your Moodle or how you host it.
But in Apache adding the following to httpd.conf and restarting the server should solve the issue:

<Directory yourmoodledirectoryhere>
  Options -Indexes
</Directory>


Instead of seeing the contents you (and everybody else) will be met with a Forbidden error code when trying to enter http://yourservername/admin/cli

Even if you're not using Apache the settings you need to apply should not differ that much.
I hope this helps.



Average of ratings: Useful (1)