Jump to content

Secure location for PHP files?


sorenchr

Recommended Posts

Hi, im currently developing a login system for my webpage. Recently i read a tutorial that stated that all php pages, containing sensitive code, should not be placed in the webserver root(Im on a shared webhost). So would a secure solution be, to place my login-process.php(handles the entered form data) inside a folder called "login" for example?

Link to comment
https://forums.phpfreaks.com/topic/140432-secure-location-for-php-files/
Share on other sites

Oh wait, im using Filezilla, and when i right click on a directory and select "File attributes...", i can set some options for that particular directory. Seems like i can change owner, group and public permissions (write, execute and read), and i can assign a numeric value to that directory, is this what you are talking about?

Yes.  Owner will be the server hosting your site usually.

 

If you remove Group and Public permissions, it should come out to 700.  Then you can try to access it by going to http://www.yoursite.com/yourfile.ext  and you should not be able to access it.

 

There are tutorials, just google it.  CHMOD, web file permissions, etc etc

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.