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
Find and disable Use "safe write"
option:
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With