Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-13736

Upgrade to 29: fix-permissions script fails changing ownership

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Minor
    • Resolution: Fixed
    • 29.0.0
    • 29.0.1
    • None
    • Security Level: Default (Default Security Scheme)
    • None
    • Ubuntu 18.04, 20.04 servers
    • 1
    • Horizon 2021 - Nov 11 - Dec 1
      • fix-permissions script works as expected and allows to run OpenNMS as non-root

    Description

      root@opennms:/usr/share/opennms/bin# find /usr/share/opennms/share/|wc -l
      217496
      root@opennms:/usr/share/opennms/bin# ./fix-permissions 
      * fixing ownership of /usr/share/opennms/
      * fixing ownership of /usr/share/opennms/ contents
      sudo: unable to execute /bin/chown: Argument list too long
      xargs: /usr/bin/sudo: terminated by signal 1
      root@opennms:/usr/share/opennms/bin# 

      Release 29 introduced the option to run OpenNMS as an unprivileged user. For this the change of ownership is needed for all files accessed by OpenNMS. The script that does this fails for me on three different Ubuntu servers. Workaround was so manually invoke an

      sudo chown -R opennms:opennms /usr/share/opennms/share/*

      for the OpenNMS share directory. After that, the script runs as expected:

      root@opennms:/usr/share/opennms/bin# ./fix-permissions 
      * fixing ownership of /usr/share/opennms/
      * fixing ownership of /usr/share/opennms/ contents
      * fixing ownership of /usr/share/opennms/etc/
      * fixing ownership of /usr/share/opennms/etc/ contents
      * fixing ownership of /usr/share/opennms/lib/
      * fixing ownership of /usr/share/opennms/lib/ contents
      * fixing ownership of /usr/share/opennms/logs/
      * fixing ownership of /usr/share/opennms/logs/ contents
      * fixing ownership of /usr/share/opennms/share/
      * fixing ownership of /usr/share/opennms/share/ contents
      * fixing ownership of /etc/default/opennms
      * fixing ownership of /etc/default/opennms
      * fixing ownership of /etc/default/opennms contents
      root@opennms:/usr/share/opennms/bin# 
      

      Attachments

        Activity

          People

            ranger Benjamin Reed
            cpape Christian Pape
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: