Can I hide a folder on a website?

If I plan on reading from or writining to a textfile on my website, does that automatically imply that anyone can read the contents of those textfiles?

Is there a way to hide a folder?  How about a file?

thanks,
nbw
newbiewebSr. Software EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

 
gamebitsCommented:
There is different way to protect a folder an easy one is to have a file named index.html in the folder, if somebody is trying to access the folder the server will deliver the index.html by default.
0

Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
 
newbiewebSr. Software EngineerAuthor Commented:
so if I have index.html in every folder, its contents will be invisible?

Can that file be empty?
0
 
gamebitsCommented:
Yes but I usually put a message (using html) saying something like Forbidden access or error 500 or something like that.

If the folder is to contain sensitive data a safer way is to create a folder above the web root.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
newbiewebSr. Software EngineerAuthor Commented:
I tested it and it worked!  Great trick.

This data won't be that sensitive, but how easy would it be for someone to crack it?
0
 
gamebitsCommented:
I'm not sure but I think somebody would actually have to break on the server to access the files in a folder, not beeing a hacker myself I don't know how they can do it neither how easy it is (or not).
0
 
newbiewebSr. Software EngineerAuthor Commented:
thanks.  great idea!
0
 
gamebitsCommented:
Thanks for the points and the grade.

Gamebits
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.