I’m trying to recover my business site from a PHP injection hack on the 18th. I decided to scrap the old site and install new, but for some reason, I can’t set permissions on the configuration file to 666. When I FTP in to do it, it resets to 444 instantly. The part that’s making my head explode is that it worked just fine yesterday on my test site, but now that one isn’t working either. All other files I can change to any permission I want, no problem. I have a ticket in, but I’m just needing advice on anything I might be over looking. It’s been a long weekend.
Do you really want 666 or 664?
If its on a shared server 666 might be dangerous, I think it’s less dangerous in a VPS or dedicated server, but 664 would be more of a standard safe configuration.
Yes, I understand the danger. I can’t configure it with anything with a 6 in the first digit. 666 = no, 466 = yes, 446 = yes. Frustrating. Especially since it worked just fine yesterday.
Go up a level and see how the directory those files are in is set?
That directory is set to 755. In fact, every other file in that directory can be set to 666, but not this file.
I’m not a pro on this topic, someone else will come along soon I’m sure, but read here: http://wiki.dreamhost.com/Unix_File_Permissions#Special_features.3F