Hello, I have encountered issues while trying to install plugins. I was attempting to install auth-ldap.phar and storage-fs.phar, for which I executed sudo yum install php-phar. However, these plugins did not appear under the installed plugins tab in osTicket. Subsequently, I proceeded to convert the .phar files to .zip, but still had no success in decompressing them. Everything functioned correctly when I installed the es_AR.phar language, yet issues persist with the plugins. I have attached screenshots for further clarification:[upl-image-preview

Thanks in advance.

  • KevinTheJedi replied to this.
  • killobs

    Plugins are always in PHAR (PHP Archive) format and should always be placed in the /path/to/osticket/include/plugins/ folder. If you've done so and they still don't appear when you click Add New Plugin then you likely don't have the appropriate permissions/ownership on the files. The unix file permissions for PHARs (or any PHP files for that matter) are typically 0644. The files should also be owned by the apache user/group so that the webserver can read and serve them.

    Cheers.

    killobs

    Plugins are always in PHAR (PHP Archive) format and should always be placed in the /path/to/osticket/include/plugins/ folder. If you've done so and they still don't appear when you click Add New Plugin then you likely don't have the appropriate permissions/ownership on the files. The unix file permissions for PHARs (or any PHP files for that matter) are typically 0644. The files should also be owned by the apache user/group so that the webserver can read and serve them.

    Cheers.

      KevinTheJedi
      Thank you for responding. I have tried applying the permissions you suggested, even using 0774, but to no avail. Other things I attempted without success include:

      • Clearing cache
      • Checking the php-phar installation, which seems to be correct.
      • Checking the mod_ssl installation, it was not installed, and installing it did not result in any positive changes.
      • Adding extension=phar to the php.ini file.
      • Checking the error log, nothing related to the problem seems to appear, I attach an image for reference:

        killobs

        Then I’m not sure what’s going on. Only thing you have to do is install and enable the php-phar extension, upload the PHAR files to the include/plugins/ directory, make sure they have the appropriate permissions/ownership, and they should appear when you click Add New Plugin.

        You might have SELinux blocking the files, if that’s the case you’ll need to add the httpd_sys_content_t or httpd_sys_rw_content_t context to the PHAR files.

        Cheers.

          KevinTheJedi
          I've tried it, but there was still no solution. I will request a reinstallation of osTicket and I will notify you if there was a solution. Thank you very much.

          9 days later

          so 774 is
          owner: read, write, execute
          group: read, write, execute
          other: read

          What you haven't told us is what the owner.group is on the .phar files.
          If the webserver is executing the site using the user www-data
          And the file is owned by killobs.users
          then the Webserver only has read permissions on the plugin.

          a month later

          Hi,

          I am having a similar issue.
          I am using this linux distro:

          Distributor ID: Ubuntu
          Description: Ubuntu 22.04.2 LTS
          Release: 22.04
          Codename: jammy

          OSTicket was installed in /var/www/osTicket;

          Plugins are inside /var/www/osTicket/include/plugins;

          folder "include" and folder "plugins" has 777 permissions:

          drwxrwxrwx 3 www-data www-data 4096 Jun 29 23:05 include;

          drwxrwxrwx 3 www-data www-data 4096 Jun 30 14:17 plugins;

          I've checked that the server is executed with user www-data - so I've changed the owner to www-data for the folder "plugins" as well:
          drwxrwxrwx 3 www-data www-data 4096 Jun 30 14:17 plugins

          Inside the plugins folder I have a buch of plugins, but for testing purposes I changed the owner ID and permissions as follows:

          -rwxrwxrwx 1 www-data suporteadmin 59247 Jun 13 16:13 audit.phar
          -rwxrwxrwx 1 www-data suporteadmin 30898 Jun 13 16:13 auth-2fa.phar
          -rwxrwxrwx 1 suporteadmin suporteadmin 273912 Jun 13 16:13 auth-ldap.phar
          -rwxrwxrwx 1 suporteadmin suporteadmin 667850 Jun 13 16:13 auth-oauth2.phar
          -rwxrwxrwx 1 root suporteadmin 6430 Jun 13 16:13 auth-passthru.phar
          -rwxrwxrwx 1 www-data www-data 9240 Jun 13 16:13 auth-password-policy.phar
          -rwxrwxrwx 1 suporteadmin suporteadmin 5551 Jun 13 16:13 storage-fs.phar
          -rwxrwxrwx 1 suporteadmin suporteadmin 27203433 Jun 13 16:14 storage-s3.phar

          As you can see, there are different users/groups for the files but none of these plugins are available to install in OSTicket ui.

          Also:

          • I checked the SELinux status = disabled;
          • I have php8.1 installed ( 8.1.21-1+ubuntu22.04.1+deb.sury.org+)
          • Phar extensions are enabled in php 8.1;

          Heres what I see on the osTicket dashboard information page:

          Any ideias what might be wrong? Let me know if you need more information on the setup.

          Thanks!

            Hi Kevin,

            Thanks for your feedback on this.

            I did some further checks:

            Glob is enabled, i've checked it through this command:

            php -r 'var_dump(function_exists("glob"));'

            Which returned a "bool(true)"

            I've also read in another post that the apparmor could also be causing this, but I disabled the function and I am still having the same outcome, so I enabled it back.

            Any chance you can share further information on adding debug statements as you suggested?

            Does it need to be done on the plugins.php file inside the scp folder?

            Thanks

            Br,

              epanao

              There are no specific debug statements. You should just got line by line and see where it's failing. Like see if class_exists('Phar'), etc.

              Cheers.

              Hi,
              Unfortunatelly I don't know how to debug a running .php - but fortunatelly I was able to solve the issue!

              I was using the wrong directory for the plugins... 🙁

              I was using /var/www/osTicket/include/plugins whereas I should be using /var/www/osTicket/upload/include/plugins...

              So I copied the plugins to that folder and they still did not appear, through the ls -l command I was able to quickly pinpoint the cause:
              -wrong ownership of the .phar files (they were all copied using root user), proceed to change all file ownership to "www-data" through this command:

              sudo chown www-data *phar

              The plugins appeared without the need of restarting the apache server or the vm itself..

              On a sidenote, I've tried to follow all the information osTicket has available on its website, even in this video: https://youtu.be/Olh1z-RNEhQ it's shown that the osTicket plugin folder is inside "var/www/osTicket/include/plugin " - however I reckon there isn't much information on the OS where osTicket was installed in this video (might be installed on a different folder...)

              Anyway, glad I managed to get past the issue! Hope this information comes in handy for someone with the same issue.

              Kevin thanks for your help

              Best regards!

              Write a Reply...