Hi,
I have a CMS that I wrote, that I'm using on some clients' sites. I need some help understanding Apache permissions.
The CMS writes files to the file system, when it creates new pages, and it also provides a file upload tool. The only way that this works is to make the directories 777. But, I know this is a bad practice as my sites were recently hacked into by Russian hackers, and files were placed on the server in 777 directories. (nothing against anyone reading this from Russia :quiet: )
I have a shared hosting setup.
I have uploaded my CMS to other hosts (mediatemple) and the CMS works with perms at 755 which is much safer. The tech support was not so helpful at my other ISP and I'm trying to understand how 755 differs from 777 in this scenario, when a script on the server is trying to create a file.
Also, I have NO CLUE how someone from outside could possibly hack into a site with 777 perms, save through FTP, and I don't think that's how it was done. Does anyone have some insight to Apache security, can offer an explanation of how they could have gotten into the server w/o FTP.
So I guess that's 2 questions: How to code w/755 and why it would work on one server and not another, and how someone could write a file in a 777 directory w/o using FTP access.
Thanks for any help!
Krostitzer
--- EDIT ---
D'OH, it should, according to my ISP, be 775 and not 755 for the directory. Now the script can write to it!
Still would appreciate input about the other question!!!