PHPstorm Group ID (GID) file saving defaults

PHPstorm changes the group ID (GID) of saved files to the user default. This is often the user's GID itself. This makes PHPstorm-saved files not play nicely with shared development environments -- even if the shared environment is for a single user developing in a VirtualBox.

In order to have PHPstorm run using a particular group ID like www-data, use the following script to change group ID when running PHPstorm:

#!/bin/bash
newgrp www-data << ENDCMD
phpstorm.sh &
ENDCMD

Reference:
https://stackoverflow.com/questions/299728/how-do-you-use-newgrp-in-a-script-then-stay-in-that-group-when-the-script-exits

7 / 2025