I got fed up with always going through IDEAs directory structure and changing the user permissions every time IntelliJ issued a new build release so I created a script to do this.
What the script does is go through the directory of a newly installed IDEA and:
1) Removes any permission for the other group (chmod o-rwx)
2) Changes ownership of all files and folders in the installation directory to the specified group (the name of the group is supplied as a parameter to the script).
3) Copies the permission that the owner of the files (user) has to the group (chmod g+u) recursively.
4) Removes a file called 'current' from the working directory.
5) Creates a symlink that's called 'current' in the working directory that points to the installation directory.
The usage of the script is:
I hope this script will benefit someone else besides me and you guys at IntelliJ are welcome to use the underlying idea in your Linux installer (I think it's lacking such a thing, where a group can be specified that should be allowed to run the tool).
Just to give you an idea of how this script works for me: I have a directory where I install Aurora builds.
When I install a new build, it goes into a folder called buildXXX where XXX is the build number. Let's say that build 805 just came out. Then I install build 805 to /intellij/build805, run the script on that folder by issuing: "./idea_prep.sh build805 dev". This will change the permissions for build805 and generate a new 'current' link that points to the new installation.