Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7531001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:04:01+00:00 2026-05-30T05:04:01+00:00

all! On our server we have got a directory ‘files’ with materials for students

  • 0

all!

On our server we have got a directory ‘files’ with materials for students and teachers:

http://sample.ru/files/4students/
http://sample.ru/files/4teacherszzz/
http://sample.ru/files/markszzz/
...

Each directory, when you type it into your web-browser shows you ‘Index of /files/4students/’ page with list of files/subdirs.

But, we’ve got problem: when the student types ‘http://sample.ru/files/’ he can see all other folders! But students must not see teachers files (in folders 4teacherzzz and markszzz).

So, we’ve put blank index.html into /files/ . And by typing this url, student can’t see other folders.

Now, this is question: can anyone student (he only knows ‘http://sample.ru /files/4students/’ url) get list of urls in ‘http://sample.ru /files/’ (may be by special typing ‘/files/4students/../’ or so on)? and how? and how to deny this?

The problem is that we must leave that folders system — it is more convenient for teachers (they only copy files to a folder on server and files automatically appears in “Index of …” page)

Thanks for your replies!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:04:05+00:00Added an answer on May 30, 2026 at 5:04 am

    Depending on your brand of web server – no. Most brands of normal origin servers (like Apache, IIS) will be particularly careful about collapsing any attempts at ../.. and similar naughtiness. (Note that some servers optimized for proxy/caching and similar non-origin use may well NOT do that).

    But regardless you want to read the documentation very carefully. And note that most servers, like Apache and IIS, have specific directives for just this particular problem.

    Have a look at “Indexes” – .i.e.

    <Directory /something/>
       option -Indexes
    

    …

    note the minus – will very explicitly disable indexes (Be careful with symbolic links though – or also use -FollowSymLinks ). http://httpd.apache.org/docs/2.0/mod/core.html has the full story.

    Check specifically the section ‘Directory Directive’ and note the text:

    Be careful with the directory-path arguments: They have to literally
    match the filesystem path which Apache uses to access the files.
    Directives applied to a particular will not apply to files
    accessed from that same directory via a different path, such as via
    different symbolic links.

    and the example just below it. So you typically will want to lock down (-Indexes) on the lower level and then do a directory(match) one down for the students where you do allow Indexes.

    Your trick of adding an index.html usually works – but note that this is just because mod_autoindex snarfs it in a timely fashion. This is not as guaranteed as above – in particular when you have MultiViews or other localisation/internationalization and similar (language/charset) variants in your server. See http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html.

    Hope this helps,

    Dw.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a SQL Server 2005 database, and currently all our users are connecting
Our database server is a SQL 2008 server. My colleagues all have XP service
Our server got hacked via some SQL Injection method (now patched). All our PHP
All, Atlast had our admin install the PEAR SOAP module on our apache server.
I need to hash (MD5) all the password in our Sql Server 2000 database.
Currently all our files are stored on a Windows network drive and with 15
we're currently generating all our official documents using XSL-FO transformation using .xml files as
I've got a media-rich site that's going just beyond the what our server can
Our team got into work in the morning and we found that all of
Hi I have got an ajax code as follows: $.ajax({ type:POST, url: 'sample.php', data:data=+data,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.