# Securing files and directories

**URL:** <https://forum.phpvms.net/t/securing-files-and-directories/3046>\
**Category:** Announcements\
**Created:** [July 13, 2010, 6:51pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046 "2010-07-13T18:51:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![nabeel](https://forum.phpvms.net/user_avatar/forum.phpvms.net/nabeel/32/2971_2.png) [@nabeel](https://forum.phpvms.net/u/nabeel)\
**Post date:** [July 13, 2010, 6:51pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/1 "2010-07-13T18:51:20Z")

</div>

A topic has come up about basic security for phpVMS files and folders, to prevent the theft of your template files. It’s important to read this in the documentation. The documentation link is:

And the thread is:

Thanks to all those who brought it up. I’d recommend applying the .htaccess file immediately, or if your host has .htaccess files disabled, how to go about securing those files.

---

<div class="post-metadata">

**Author:** ![Kyle](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/k/848f3c/32.png) [@Kyle](https://forum.phpvms.net/u/Kyle)\
**Post date:** [July 13, 2010, 7:33pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/2 "2010-07-13T19:33:18Z")

</div>

thanks nabeel! Now my files are safe from those little thevies b\*\*t\*\*ds!

phpVMS looking good!

---

<div class="post-metadata">

**Author:** ![skymx](https://forum.phpvms.net/user_avatar/forum.phpvms.net/skymx/32/63_2.png) [@skymx](https://forum.phpvms.net/u/skymx)\
**Post date:** [July 14, 2010, 2:30am UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/3 "2010-07-14T02:30:51Z")

</div>

It Works! Perfect… that is the solution.

SK

---

<div class="post-metadata">

**Author:** ![skymx](https://forum.phpvms.net/user_avatar/forum.phpvms.net/skymx/32/63_2.png) [@skymx](https://forum.phpvms.net/u/skymx)\
**Post date:** [July 14, 2010, 4:00pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/4 "2010-07-14T16:00:26Z")

</div>

When I found this “insecurity” or (mis\_configuration on the server side) that allows directory browsing

I tried several things to protect our contents, here they are:

One was to drop an empty index page on each directory I wanted to protect,

could be php or html, that itself blocks the listing of the directory.

then, later on I added some info on that “empty” page that reads like this:

\<center\>\<h1\>You Are \<span style=“color:red”\>NOT \</span\> Authorized to acces this Area!\</h1\>\<br\>

\<h1\>Usted \<span style=“color:red”\> NO \</span\>esta autorizado a acceder esta Area!\</h1\>\<br\>\<br\>\<hr\>

\<center\>\<div class=“post”\>\<h1\>YOUR IP ADDRESS IS: \<span style=“color:red”\>\<?php echo $\_SERVER[‘REMOTE\_ADDR’]; ?\>\</span\>\</h1\>\</center\>\<br\>

\<h1\>\<strong\>And it has been logged!\</h1\>\</strong\>\</h1\>\</center\>\<br\>\<br\>

As you can see is in english and spanish languajes, and displays the IP of the “visitors” of this area.

Is entirelly up to you if you want to log the IPs or not.

Other measure was to add a java script to disable mouse rigth click, so it makes difficult to copy your images.

Nabeel says, it annoys users, but helps. Also blocks seeing the pageÂ´s source\_code.

But there exists other means to see the source code for the page.

LetÂ´s keep phpvms “secure” and our contents too!

SK

---

<div class="post-metadata">

**Author:** ![Jeff](https://forum.phpvms.net/user_avatar/forum.phpvms.net/jeff/32/78_2.png) [@Jeff](https://forum.phpvms.net/u/Jeff)\
**Post date:** [July 14, 2010, 4:22pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/5 "2010-07-14T16:22:48Z")

</div>

> Other measure was to add a java script to disable mouse rigth click, so it makes difficult to copy your images.

Not to be the bad guy here, but you can always drag-n-drop images from your site to their desktop from just about any website. There are ways around that, but not sure how.

---

<div class="post-metadata">

**Author:** ![skymx](https://forum.phpvms.net/user_avatar/forum.phpvms.net/skymx/32/63_2.png) [@skymx](https://forum.phpvms.net/u/skymx)\
**Post date:** [July 14, 2010, 4:35pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/6 "2010-07-14T16:35:42Z")

</div>

> Not to be the bad guy here, but you can always drag-n-drop images from your site to their desktop from just about any website. There are ways around that, but not sure how.

Most everything is posible, but I did not know about this one, cool!

---

<div class="post-metadata">

**Author:** ![skymx](https://forum.phpvms.net/user_avatar/forum.phpvms.net/skymx/32/63_2.png) [@skymx](https://forum.phpvms.net/u/skymx)\
**Post date:** [July 14, 2010, 6:11pm UTC](https://forum.phpvms.net/t/securing-files-and-directories/3046/7 "2010-07-14T18:11:52Z")

</div>

There is an additional option to protect your contents, is a simple application and itÂ´s FREE!!! (For Personal Use!)

take a peek as it might be what youÂ´re looking for to “extra” protect your site, code and images

(with some limitations on the personal edition.)

ohh yes, the link to grab it. itÂ´s here! Enjoy!

[http://www.protware.com/download.htm](http://www.protware.com/download.htm)

SK
