When setting the umask to 0077 the JIRA Installer does not set files with correct permissions.
Steps to Reproduce
Perform the following steps to reproduce this (as root):
wget http:sh atlassian-jira-5.1.8-x64.bin
find . -name "ApplicationPropertiesJira*"
history | cut -c 8-
Simple example in the folder /atlassian-jira/WEB-INF/classes/com/atlassian/jira/startup
-rw------- 1 root root 1954 2012-10-29 01:27 ApplicationPropertiesJiraHomePathLocator$1.class
-rw-r--r-- 1 root root 1658 2012-10-29 01:27 ApplicationPropertiesJiraHomePathLocator.class
Note that in the subclass file the group and global permissions are not set. This is problematic.
Additionally, the shell scripts will not be provided with the appropriate permissions so JIRA will not be able to be started:
[root@hercules tmp]# /etc/init.d/jira start
To run JIRA in the foreground, start the server with start-jira.sh -fg
executing using dedicated user: jira
bash: ./startup.sh: Permission denied
The same goes for upgrades as it does for installs.
- Set umask to something else (eg: 0022) prior to installation
- Fix the file permissions after install:
chmod -R u=rwx,g=rx,o=rx /var/atlassian/application-data/jira
chmod -R u=rwx,g=rx,o=rx /opt/atlassian/jira/