Find the answer to your Linux question:
Results 1 to 5 of 5
I have my website up and running no problem with Apache. I must be confused on setting up file/directory permissions however. I want to restrict users from accessing directory listings ...
  1. #1
    Just Joined!
    Join Date
    Dec 2007
    Posts
    3

    Simple question on directory listings

    I have my website up and running no problem with Apache. I must be confused on setting up file/directory permissions however. I want to restrict users from accessing directory listings on the server. I've read all I can find about setting permissions on directories in Linux and tried various combinations. I can't seem to be able to block people from getting directory listings without also denying the web server from accessing files in the directory.

    Can anyone give me a tip on this?

    thanks much

  2. #2
    Linux Engineer RobinVossen's Avatar
    Join Date
    Aug 2007
    Location
    The Netherlands
    Posts
    1,422
    to show the Current premissions you should so:
    ls -l

    or

    ls -al

    to show all the files (including hidden)
    New Users, please read this..
    Google first, then ask..

  3. #3
    Just Joined!
    Join Date
    Dec 2007
    Posts
    3

    thanks for the reply, but...

    thanks for the reply but I need to explain the problem better.

    People coming to my web site can see my directory listings by typing a path. Something like www.mywebsite.com/sub-directory/

    I want the web server to post a "Access denied" message but right now it just posts a list of all the files in the directory.

    I don't know how to set permissions to make this happen.

  4. #4
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    .htaccess file of some kind?

  5. #5
    Just Joined!
    Join Date
    Dec 2007
    Posts
    3

    you are right on

    Thanks for the suggestion. You are right. This is an apache issue, not Linux. I'm tracing it down now and as you have said it involves either .htaccess or httpd.conf or both.

    Much obliged.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •