Last active
August 29, 2015 14:04
-
-
Save ajbrown/65a2a372f32e8d74d834 to your computer and use it in GitHub Desktop.
Fixes permissions of IntelliJ app folder on MacOSX when being used by multiple accounts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# @author A.J. Brown <[email protected]> | |
# Permissions will sometimes get screwed up when using Intelli from multiple accounts on the | |
# same machine (For example, one user for work, one for home). I've had success doing the following | |
# steps. Note you may need to run the permissions update part of this multiple times after upgrading | |
# or installing a license. It's safe to run this entire script multiple times as-is, though. | |
# | |
IDEA_PATH="/Applications/IntelliJ\ IDEA\ 13.app" | |
GROUP=admin | |
# 1.) Make sure all users are in the same group. I used "admin", since that was the best fit anyway. | |
# This step, unfortunately, must be done by hand in OSX | |
# 2.) Change the group of the IntelliJ app files to our new group | |
chgrp -R $GROUP $IDEA_PATH | |
# 3.) Allow the group to execute any files that are already executable | |
`find /Applications/IntelliJ\ IDEA\ 13.app/* -perm '+u=x' -exec chmod g+x "{}" \;` | |
# 4.) Allow the group to write any files that are already writeable | |
`find /Applications/IntelliJ\ IDEA\ 13.app/* -perm '+u=w' -exec chmod g+w "{}" \;` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment