Make Directory Not Accessible But Allow Read of its Files

Post all HTML related questions here. No support.

Moderator: Project members

Post Reply
500 Command not understood
Posts: 1
Joined: 2014-04-05 05:49

Make Directory Not Accessible But Allow Read of its Files

#1 Post by Sam.Z » 2014-04-05 06:00


Is it possible to not allow public reading of a directory but allow public reading of the files inside that directory?

Essentially I dont want people see navigate to and see a list all the files in that directory. Maybe I can achieve this by editting .htaccess? But it would be easier to edit the directory through Filezilla.

I have tried setting the directories permissions to disallow public read, write and execute. And setting a file inside that directory to allow public read, write, execute. But when I go to access the file it gives me a 403 error.

User avatar
Posts: 25375
Joined: 2006-05-01 03:28
Location: Germany

Re: Make Directory Not Accessible But Allow Read of its File

#2 Post by boco » 2014-04-05 16:30

FileZilla is FTP, you cannot directly modify access rights for the HTTP server.

If you don't want anyone to see the files in your directories, make sure you have "Options -Index" inside your .htaccess files. Alternatively, that option has to be included in HTTP server directives. Public reading of the directory must be enabled or public cannot access it. Note that if index listings are not allowed and there's no valid index document in a directory, getting a 403 Forbidden error is perfectly normal.

Search the web for 'prevent index listings' (no quotes).
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test:

Post Reply