Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-32435

JIRA Linux Installer does not set files with correct permissions when a non-default umask is used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Low
    • None
    • 5.2.8, 6.1.2, 6.1.4, 8.15.1
    • Installation

    Description

      Problem

      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):

      umask 0077
      umask
      wget http://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-5.1.8-x64.bin
      sh atlassian-jira-5.1.8-x64.bin
      cd jira_install/
      find . -name "ApplicationPropertiesJira*"
      cd ./atlassian-jira/WEB-INF/classes/com/atlassian/jira/startup/
      ls -la
      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.

      Workarounds:

      1. Set umask to something else (eg: 0022) prior to installation
      2. 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/
        

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mandreacchio Michael Andreacchio
              Votes:
              10 Vote for this issue
              Watchers:
              8 Start watching this issue

              Dates

                Created:
                Updated: