{"action":"created","issue":{"url":"https://api.github.com/repos/bolt/bolt/issues/3962","labels_url":"https://api.github.com/repos/bolt/bolt/issues/3962/labels{/name}","comments_url":"https://api.github.com/repos/bolt/bolt/issues/3962/comments","events_url":"https://api.github.com/repos/bolt/bolt/issues/3962/events","html_url":"https://github.com/bolt/bolt/issues/3962","id":100848486,"number":3962,"title":"Editing write protected files in Bolt backend deletes contents/corrupts file.","user":{"login":"hansgrinwis","id":13786613,"avatar_url":"https://avatars.githubusercontent.com/u/13786613?v=3","gravatar_id":"","url":"https://api.github.com/users/hansgrinwis","html_url":"https://github.com/hansgrinwis","followers_url":"https://api.github.com/users/hansgrinwis/followers","following_url":"https://api.github.com/users/hansgrinwis/following{/other_user}","gists_url":"https://api.github.com/users/hansgrinwis/gists{/gist_id}","starred_url":"https://api.github.com/users/hansgrinwis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hansgrinwis/subscriptions","organizations_url":"https://api.github.com/users/hansgrinwis/orgs","repos_url":"https://api.github.com/users/hansgrinwis/repos","events_url":"https://api.github.com/users/hansgrinwis/events{/privacy}","received_events_url":"https://api.github.com/users/hansgrinwis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-13T19:24:46Z","updated_at":"2015-08-13T19:29:02Z","closed_at":null,"body":"Note upfront: I know I should write-enable these files!\r\n\r\nBug summary: \r\nEditing write protected files in Bolt backend deletes contents/corrupts file.\r\n\r\nSpecifics: \r\nExample: URL http://<<server-address>>/Bolt/bolt/file/edit/theme/<<theme-name>>/_aside.twig\r\nBolt version: 2.2.5\r\nInstallation method: Option 2: The traditional way, using (S)FTP\r\nBrowser: IE 11.0.9600.17905 (update version 11.0.21)\r\nTested in other browsers: Chrome 44.0.2403.155 m (64-bit), Firefox 40.0\r\n\r\nSteps to reproduce:\r\nOpen a (theme) file that is write protected in the Bolt backend editor (Bestandsbeheer/Bekijk-bewerk templates). An note appears that Bolt cannot save the file. (Het bestand '<<theme-name>>//_aside.twig' is niet schrijfbaar. Gebruik je eigen editor om wijzigingen in dit bestand aan te brengen.) \r\n\r\nExpected result:\r\nBolt would not touch (i.e. modify) the file.\r\n\r\nActual result:\r\nAll of a sudden the filesize is 0 bytes. Browser refresh results in \"Whoops! There was an error.\"\r\n\r\n![bolt1](https://cloud.githubusercontent.com/assets/13786613/9259440/80830d7e-4201-11e5-8644-2bf4d85e13ee.png)\r\n![bolt2](https://cloud.githubusercontent.com/assets/13786613/9259444/83f319cc-4201-11e5-9399-8c6f89b79703.png)\r\n![bolt3](https://cloud.githubusercontent.com/assets/13786613/9259448/862cbe64-4201-11e5-8258-1f99db047133.png)\r\n![bolt4](https://cloud.githubusercontent.com/assets/13786613/9259452/87ad7eae-4201-11e5-8e6c-64f0ab7e9993.png)"},"comment":{"url":"https://api.github.com/repos/bolt/bolt/issues/comments/130812364","html_url":"https://github.com/bolt/bolt/issues/3962#issuecomment-130812364","issue_url":"https://api.github.com/repos/bolt/bolt/issues/3962","id":130812364,"user":{"login":"bobdenotter","id":1833361,"avatar_url":"https://avatars.githubusercontent.com/u/1833361?v=3","gravatar_id":"","url":"https://api.github.com/users/bobdenotter","html_url":"https://github.com/bobdenotter","followers_url":"https://api.github.com/users/bobdenotter/followers","following_url":"https://api.github.com/users/bobdenotter/following{/other_user}","gists_url":"https://api.github.com/users/bobdenotter/gists{/gist_id}","starred_url":"https://api.github.com/users/bobdenotter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobdenotter/subscriptions","organizations_url":"https://api.github.com/users/bobdenotter/orgs","repos_url":"https://api.github.com/users/bobdenotter/repos","events_url":"https://api.github.com/users/bobdenotter/events{/privacy}","received_events_url":"https://api.github.com/users/bobdenotter/received_events","type":"User","site_admin":false},"created_at":"2015-08-13T19:29:02Z","updated_at":"2015-08-13T19:29:02Z","body":"I'm going to try and reproduce this. This is weird though, because if Bolt is not allowed to _write_ the file, Bolt shouldn't even be _able_ to clear or corrupt it. \r\n\r\n - What version of PHP is the server running? \r\n - Apache? Nginx? \r\n - Linnux? Windows? \r\n"}}