Lenbot Posted June 19, 2006 Share Posted June 19, 2006 Hello all I have always been in control of my server and could put the database password in a safe secure location, out side of the website directory. Now I don't have access to the server and I have to set up File permission to do so, except you can't find anything online or I don't know what I am looking for. I need to have a Folder inside my main directory with a dbpass.inc File that only the script I run can have access to it and No one else. I have literally tried a million combinations and I give up, I need help I don't know what the Hell I am doing it is all greek to me. I have 3 sets of optionsOwnerGroupPubliceach with permission to Read [] Write [] Excute []I need to know the right combination to put on the folder, and on the file so I can include the file where I need it but the public can't see it or reach it in any way.Thanks for all the help, I assume it's something I might have to do in PHP I honestly have no clue, please help and its highly appreciated for any help anyone gives me.cheers -Lenbot Quote Link to comment https://forums.phpfreaks.com/topic/12380-file-permission-set-up-for-php-database-passwords/ Share on other sites More sharing options...
poirot Posted June 19, 2006 Share Posted June 19, 2006 I think CHMOD is not the solution. PHP won't access the files as "Owner", so 600 won't be of any good. Maybe try 660, but that probably won't work either.I'd secure the folder with .htaccess Check:[a href=\"http://www.phpfreaks.com/forums/index.php?showtopic=96195&hl=deny\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...c=96195&hl=deny[/a]I use:[code]Order Deny,AllowDeny from allAllow from 127.0.0.1[/code] Quote Link to comment https://forums.phpfreaks.com/topic/12380-file-permission-set-up-for-php-database-passwords/#findComment-47329 Share on other sites More sharing options...
Lenbot Posted June 19, 2006 Author Share Posted June 19, 2006 ya the website won't allow me to upload the .htaccess file. buggers. anyone else have any other ideas it must be possible Quote Link to comment https://forums.phpfreaks.com/topic/12380-file-permission-set-up-for-php-database-passwords/#findComment-47370 Share on other sites More sharing options...
poirot Posted June 19, 2006 Share Posted June 19, 2006 What is the format of the database? Quote Link to comment https://forums.phpfreaks.com/topic/12380-file-permission-set-up-for-php-database-passwords/#findComment-47380 Share on other sites More sharing options...
craygo Posted June 19, 2006 Share Posted June 19, 2006 If this is a hosting company, you can put it outside the public_html folder and it won't be accessible to the public, but you should be able to link to it through an include or require using the absolute path. Quote Link to comment https://forums.phpfreaks.com/topic/12380-file-permission-set-up-for-php-database-passwords/#findComment-47438 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.