My website is hosted on a shared host. I currently have my database connection info in a folder one level above public_html. What is the best method to prevent access to this folder?
not2easy
1:30 pm on Apr 13, 2022 (gmt 0)
You can change the settings for folder permissions (chmod). There are several older discussions about using chmod here: [webmasterworld.com...]
Or there's wikipedia: https://en.wikipedia.org/wiki/Chmod
Larryfox
2:32 pm on Apr 13, 2022 (gmt 0)
Thanks for the reply and link. I changed permissions for that folder to 740.
phranque
7:41 pm on Apr 13, 2022 (gmt 0)
permissions work in concert with ownership.
you can change ownership of an inode (file/directory/etc) using the chown command.
Larryfox
8:03 pm on Apr 13, 2022 (gmt 0)
Thanks again. I already own all files
phranque
8:38 pm on Apr 13, 2022 (gmt 0)
740 means anyone in the group also has read access.