CentOS

777 file permissions not a solution for those without knowledge

Got a call today from one of our customers suppliers, a marketing company, who were trying to upload some blog software and wondered why their account quota had maxed out. The implication was that we’d set the quota too low (already at ~750Mb).

After some investigation, it turns out that the blog software in question had several run-away apache processes – chewing CPU cycles like they were going out of fashion and filling up the apache logs faster than quota could be allocated (e.g. read a Gb every couple of seconds!)  as the particular script looped and couldn’t read from the file it wanted. The cause of this was to do with file permissions, in particular one file was empty and a bug in the blog code meant that it was in an infinite loop, several times over as the user kept reloading the screen! The marketing company bod was kind enough to point out that they had it working on other servers quite happily, even initially having the cheek to make out like it was software they had written, when in actual fact it was an open source (GPL licensed) piece of software.

So after working this out and telling them they needed to read their documentation and fix the problem, they instead set all the files and folders to world writable (e.g. 777 file permissions) in their FTP client. At this point I decided that it was simpler to fix the issue myself whilst giving them a lecture on how 777 permissions is never a blanket solution to anything. I got to the point of telling them I’d just remove the software if they were going to leave it like that which they didn’t seem too happy about.

So after setting all the permissions back to what they should have been, 644 for files and 755 for directories, I then set the two or three folders that needed different permissions to be owned by the web server process. Hey presto! It all worked as expected. The marketing company bod was happy the situation was solved, however not even a word of thanks. Here’s guessing they’ll just simply 777 everything again next time they come across any snags rather than bothering to ask for some simple assistance! Oh well, some folk are dangerous when it comes to computers! If only their clients knew how incompetent they are, the world would be a better place as they’d avoid them!

Rant over, for today at least 😉