File ownership

I have a Linux (Ubuntu) laptop with PhpStorm (new computer, was using Windows.  It always saves edited or newly created files with owner 'john' and group 'john'.  I would prefer the group to be 'www-data'.  I've found where to change the permissions used on saved.  But I'm having to run 'chown -R john:www-data' frequently, often after every save.  Is there a way to make PhpStorm save with my preferred group?

Comment actions Permalink

Hi there,

Settings | Appearance & Behavior | System Settings --> Use "safe write"

If you disable that option IDE should just overwrite the file with new content instead of writing into the temp file first and then renaming it.

This should help with saving existing files. Not sure if it will do anything different for new ones though.

Comment actions Permalink

Yes, Andriy Bazanov's suggestion worked on existing but not new files.  I've given up and set apache to use my group as it's group.  It's not the right way to do things, but it's only my laptop, not a production site.

Comment actions Permalink

yes i would like to reopen this issue...currently the IDE is changing the group and owner to "502" even though I using the "admin" credentials for the SFTP connection with the deployment.  since user "502" isnt setup on my server, i believe its causing the 500 errors im getting whenever i start using PHPStorm with my live websites.

I'd rather not create a ghost "502" user on the server BTW...I would ideally like the IDE to just leave the owners stuff untouched if possible...and if it must change them, please use the credentials of the SFTP user that I am using to connect with via Deployment.


- mark

Comment actions Permalink

Hello Mark,

I know that it could sound too obvious but could you please check if you have anything configured in "Build, Execution, Deployment | Deployment | Options > Override default permissions..." options?



Please sign in to leave a comment.