Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-12604

SQL Privileges are ignored for new Tables after Upgrade

XMLWordPrintable

    • Icon: Documentation task Documentation task
    • Resolution: Won't fix
    • Icon: Trivial Trivial
    • None
    • 3.4.0
    • Documentation (D)
    • Ubuntu 16.04.1 LTS
      postgresql 9.5.8
      apache 2.4.18
    • Sprint 15

      Web server and Zabbix server use different users on the postgres server (zabbix and zabbix-web) on our setup.

      After the Upgrade to 3.4 I got an error message and found out that it was due to the new created tables not getting the same privileges as already existing ones.
      Affected tables where (not a complete list) sysmap*, dashboard*

      The Fix ware easy in my case: GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO "zabbix-web";

      Maybe you want to document that somewhere? Maybe this issue also affects MySQL installations with multiple DB users?
      Or Is our setup even supported?
      In any case: If not, please close the issue.

      Proposed sollution:
      Check/Copy privileges from a pre-existing table?
      Give a different warning on the frontend side for privilege problems?

      Thank you in advance

      PS: Copyable error message from the Forntend:

      pg_query(): Query failed: ERROR: permission denied for relation dashboard [zabbix.php:21 ? require_once() ? ZBase->run() ? ZBase->processRequest() ? CController->run() ? CControllerDashbrdWidgetUpdate->doAction() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CDashboard->create() ? CDashboard->validateCreate() ? CDashboard->checkDuplicates() ? DB::select() ? DBselect() ? pg_query() in include/db.inc.php:373]
      Error in query [SELECT dashboardid,name FROM dashboard WHERE name='Main Dashboard' LIMIT 1] [ERROR: permission denied for relation dashboard]
      pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [zabbix.php:21 ? require_once() ? ZBase->run() ? ZBase->processRequest() ? CController->run() ? CControllerDashbrdWidgetUpdate->doAction() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CDashboard->create() ? DB::insert() ? DB::reserveIds() ? DBselect() ? pg_query() in include/db.inc.php:373]
      Error in query [SELECT nextid FROM ids WHERE table_name='dashboard' AND field_name='dashboardid' FOR UPDATE] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
      pg_query(): Query failed: ERROR: current transaction is aborted, commands ignored until end of transaction block [zabbix.php:21 ? require_once() ? ZBase->run() ? ZBase->processRequest() ? CController->run() ? CControllerDashbrdWidgetUpdate->doAction() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CDashboard->create() ? DB::insert() ? DB::reserveIds() ? DB::refreshIds() ? DBexecute() ? pg_query() in include/db.inc.php:487]
      Error in query [DELETE FROM ids WHERE table_name='dashboard' AND field_name='dashboardid'] [ERROR: current transaction is aborted, commands ignored until end of transaction block]
      DBEXECUTE_ERROR
      

            Unassigned Unassigned
            Daywalker Michael P
            Team C
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: