Deleting/ modifying file contents from phpstorm changes group of the file in Linux (Ubuntu)
linux, phpstorm, ubuntu
Solution
Find and disable `Use "safe write"` option:
- Settings (Preferences on Mac)
- Using search box (top left corner) search for `safe`
With this option enabled (by default) the new temp file is created first and then renamed to the correct name -- this will cause the behaviour you have descried (as technically it will be brand new file at the end). When disabled, file will be rewritten in place so no changes to permissions/ownership.
P.S. PhpStorm v8.0.2 (builds on 139.xxx branch) has restructured settings screen. The full path to that option is now `Settings | Appearance & Behaviour | System Settings --> Use "safe write"`
Problem
I am logged in as "user" in Ubuntu 12.04 In my "project" directory i have created a file `query.sql`. This file has permission like below. ``` -rw-rw-r-- 1 user user 946 Dec 2 17:51 query.sql ``` This file should be web writable. So i ran this command. ``` sudo chown :www-data query.sql ``` Now the permission is ``` -rw-rw-r-- 1 user www-data 946 Dec 2 17:51 query.sql ``` If i modify content of `query.sql` from phpstorm, group is set again as `user`. Like: ``` -rw-rw-r-- 1 user user 937 Dec 2 17:57 query.sql ``` If i modify `query.sql` content using other editor like `gedit` this problem do not happen. IDE Version: 8.0.1 Build: 138.2001