How We Engineered CMS Airship to Be Simply Secure
&gt; Since Airship self-updates, it needs to be able to write to itself.<p>&gt; chown -R myusername:www-data airship<p>&gt; chmod -R g+w airship<p>Have you ever wondered why some people say that PHP is insecure? That&#x27;s one of the major reasons.<p>This app claims to care about security, but at the same time it self-updates and has no external code integrity control. This means that if the webapp has a vulnerability which was exploited, it will be very hard to detect it -- was this file changed by auto-updater or by malware? you don&#x27;t know. And even if the new version of webapp was released which fixes the bug, you can not be sure that infection is gone -- because the update process may also be compromised. And you cannot easily remove code dir and re-download -- the settings are mixed-in with the code.<p>Compare it with any other stack -- Ruby on Rails, Django, JAR files, whatever. Code cannot modify itself. The only writable thing is the database. Additionally, the repository is often under git control. If there is a vulnerability, update software and restart the server (if in doubt, backup the database and nuke&#x2F;rebuild the server instead). Even if you made a configuration error and left code dir writable, &quot;git status&quot; is enough to tell you any changed&#x2F;added files.<p>And this is why you, as an admin, should avoid PHP if you care about security. Sure, you can use sane techniques even with PHP code -- I am sure that&#x27;s what Facebook and Wikipedia do -- but most random PHP projects will require writable code dir. When choosing a web app, choose non-PHP one first.