Ad Widget

Collapse

No Permissions on Maps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kyi
    Member
    • Jun 2005
    • 64

    #1

    No Permissions on Maps

    Hi,

    after upgrade from 1.4.5 to 1.6.1 i can only access 17 from 71 configured Maps.
    its only the test server, but why i get 'ERROR: No permissions !' ?
    I´m Admin, have all rights and can see all Hosts.

    What to do?
  • Aly
    ZABBIX developer
    • May 2007
    • 1126

    #2
    Permissions scheme in 1.6 is a slightly different. So I would suggest you to recheck your permissions to all elements on the map. Or just set user to super admin.
    Zabbix | ex GUI developer

    Comment

    • kyi
      Member
      • Jun 2005
      • 64

      #3
      The User 'admin' is Zabbix Super Admins and is Member of all Groups.
      Below User rights is nothing listed under 'Deny'

      Comment

      • kyi
        Member
        • Jun 2005
        • 64

        #4
        ?any idea?

        Comment

        • xs-
          Senior Member
          Zabbix Certified Specialist
          • Dec 2007
          • 393

          #5
          - Are you using multiple nodes?
          - Do the missing maps contain items from different nodes?

          If both are yes, its a DM permission bug, no solution yet.
          This also goes for actions and screens.

          Comment

          • kyi
            Member
            • Jun 2005
            • 64

            #6
            i have only one node

            Comment

            • kyi
              Member
              • Jun 2005
              • 64

              #7
              next try:

              update to 1.6.2 and still the same with the map-permissions.
              The User is 'SuperAdmin', there no 'deny' Hosts or Groups.

              Can i reset the permissions?
              I dont want to recreate 50 maps.

              Comment

              • Aly
                ZABBIX developer
                • May 2007
                • 1126

                #8
                Another thing comes on my mind. The DB structure for maps has changed since 1.4.x, I'm not responsible for db update patches, so I can't tell you for sure if the update scripts fully upgrade maps db scheme so that it would meet 1.6.x requirements. Or may be the upgrade process hasn't gone well!?
                Zabbix | ex GUI developer

                Comment

                • kyi
                  Member
                  • Jun 2005
                  • 64

                  #9
                  ok, i try this:
                  drop database, take dump from last night (V.1.4.5), import data, patch and the problem is the same

                  and now?

                  Comment

                  • Aly
                    ZABBIX developer
                    • May 2007
                    • 1126

                    #10
                    Look into the code, look for executed queries and search the reason: why frontend doesn't show all sysmaps First, disable permission check for maps by editing the source code
                    Zabbix | ex GUI developer

                    Comment

                    • kyi
                      Member
                      • Jun 2005
                      • 64

                      #11
                      hmmm, looking into the code is fine, if you understand what happening there.
                      but in my case, i cannot follow your permission-shema.
                      i´m a net-admin not a php-programmer.

                      is ist possible to set the permissions in the databast to: everyone can access every sysmap? or reset perms? or something else?

                      i really would like to upgrade, but whitout the maps .....

                      kyi

                      Comment

                      • kyi
                        Member
                        • Jun 2005
                        • 64

                        #12
                        any Idea?
                        What can i do?
                        Nobody with an solution?

                        Comment

                        • kyi
                          Member
                          • Jun 2005
                          • 64

                          #13
                          *push*, pls

                          Comment

                          • Aly
                            ZABBIX developer
                            • May 2007
                            • 1126

                            #14
                            Change this code in forntends/php/maps.php, at line ~91:
                            Code:
                            	$result = DBselect('SELECT sysmapid,name '.
                            						' FROM sysmaps '.
                            						' WHERE '.DBin_node('sysmapid').
                            						' ORDER BY name');
                            	while($row=DBfetch($result)){
                            		if(!sysmap_accessible($row["sysmapid"],PERM_READ_ONLY))
                            			continue;
                            
                            		if(!isset($all_maps[0]))
                            			$all_maps[0] = $row['sysmapid'];
                            
                            		$all_maps[$row['sysmapid']] = 
                            			get_node_name_by_elid($row['sysmapid']).
                            			$row['name'];
                            	}
                            to this:
                            Code:
                            	$sql = 'SELECT sysmapid,name '.
                            			' FROM sysmaps '.
                            			' WHERE '.DBin_node('sysmapid').
                            			' ORDER BY name';
                            SDI($sql);			// <- comment this to hide DEBUG INFO
                            	$result = DBselect($sql);
                            	while($row=DBfetch($result)){
                            //		if(!sysmap_accessible($row["sysmapid"],PERM_READ_ONLY)) continue;
                            
                            		if(!isset($all_maps[0]))
                            			$all_maps[0] = $row['sysmapid'];
                            
                            		$all_maps[$row['sysmapid']] = 
                            			get_node_name_by_elid($row['sysmapid']).
                            			$row['name'];
                            	}
                            In maps page you will see a SQL query, execute it in your DB, see if all configured maps are shown. In dropdown menu all available maps should appear (if problem in permissions, but won't load below!).
                            Zabbix | ex GUI developer

                            Comment

                            • kyi
                              Member
                              • Jun 2005
                              • 64

                              #15
                              thxs, i try this and report.

                              and here is the debug info:

                              Code:
                                  * Error in query [Resource id #81] [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Resource id #81' at line 1]
                                  * mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource[/var/www/z/include/db.inc.php:519]
                              Last edited by kyi; 26-01-2009, 15:56.

                              Comment

                              Working...