I have a website built with Codeigniter and hosted on a Linux box.
I am trying to follow "best practices" when it comes to my file permission settings, but I'm not sure if I completely understand the security implications if I set a directory to 777.
I have an images folder which is publicly accessible (it needs to be for website users to see the website images). My Codeigniter code needs to write to a a subdirectory in that folder ('images/data') occasionally.
All of my files are defaulted to 644, and my directories to 755. For the directories that Codeigniter needs to write to, I set the permission to 777.
That seems like it's too loose. Is there some way to restrict my system so that only Codeigniter is granted "write" access to those directories? I've read some stuff online about setting the owner to "apache" but as far as I can tell, I don't have an "apache" owner on my linux box. I just see root and then the website domain owner (the server hosts multiple domains, each has a "user" account).