Ad Widget

Collapse

Installation Apache Permissions Issue

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pat_trick
    Junior Member
    • Feb 2013
    • 11

    #1

    Installation Apache Permissions Issue

    OS: Cent OS 6.3
    Apache: 2.2.15
    PHP: 5.3.3
    MySQL: 5.1.67

    Hey all, just got Zabbix 2.0 set up using the instructions at https://www.zabbix.com/documentation...lation/install

    I'm at the point where the program has been compiled and installed, and the service is running AOK. At this point I need to install the Zabbix web interface. However, when copying the files over and accessing the URL, I get the following error when loading http://<server_ip>/zabbix:

    Code:
    Forbidden
    
    You don't have permission to access /zabbix/ on this server.
    Apache/2.2.15 (CentOS) Server at <server_ip> Port 80
    The default Apache setup site loads when I access http://<server_ip>, so I know it's running. I've already chowned the entire /var/www/html/zabbix/ directory to be root:root, and the permissions are set at 664. I've also modified the Apache conf file to recognize index.php as a potential home page. However, the error persists.

    Is there another configuration that I'm missing somewhere?
  • tchjts1
    Senior Member
    • May 2008
    • 1605

    #2
    I usually chown /var/www/html/zabbix/ to be owned by zabbix.zabbix and chmod 750.

    Comment

    • pat_trick
      Junior Member
      • Feb 2013
      • 11

      #3
      Thanks, I'll give that a try and report back.

      Comment

      • pat_trick
        Junior Member
        • Feb 2013
        • 11

        #4
        OK, so did a chown to zabbix:zabbix and a chmod to 750, same results. Just to make sure it wasn't a problem with directories, I created a new file as root in /var/www/html/test/test.html and Apache can see and render it just fine.

        Also tested accessing pages directly at http://<server_ip>/zabbix/index.php and so forth, same result.

        I'm at a bit of a loss, as it just seems to be a permissions problem, but I can't get the correct permissions.

        Comment

        • tchjts1
          Senior Member
          • May 2008
          • 1605

          #5
          Can you give the output of ps -ef|grep zabbix (just one line of the zabbix_server process will be fine)

          Also the output of ls -l /var/www/html/zabbix

          Comment

          • pat_trick
            Junior Member
            • Feb 2013
            • 11

            #6
            Sure.

            ps -ef | grep zabbix:

            Code:
            zabbix   27637     1  0 22:18 ?        00:00:00 zabbix_server
            zabbix   27680 27637  0 22:18 ?        00:00:00 zabbix_server
            (second line repeats, I'm guessing child processes)


            ls -l /var/www/html/zabbix:

            Code:
            -rwxr-x---.  1 zabbix zabbix  7324 Dec  8 01:09 acknow.php
            -rwxr-x---.  1 zabbix zabbix 17207 Dec  8 01:09 actionconf.php
            -rwxr-x---.  1 zabbix zabbix  5893 Dec  8 01:09 adm.gui.php
            -rwxr-x---.  1 zabbix zabbix  3455 Dec  8 01:09 adm.housekeeper.php
            -rwxr-x---.  1 zabbix zabbix  5495 Dec  8 01:09 adm.iconmapping.php
            -rwxr-x---.  1 zabbix zabbix  5527 Dec  8 01:09 adm.images.php
            -rwxr-x---.  1 zabbix zabbix  6285 Dec  8 01:09 adm.macros.php
            -rwxr-x---.  1 zabbix zabbix  4924 Dec  8 01:09 adm.other.php
            -rwxr-x---.  1 zabbix zabbix  8746 Dec  8 01:09 adm.regexps.php
            -rwxr-x---.  1 zabbix zabbix  5144 Dec  8 01:09 adm.triggerdisplayoptions.php
            -rwxr-x---.  1 zabbix zabbix  5265 Dec  8 01:09 adm.triggerseverities.php
            -rwxr-x---.  1 zabbix zabbix  6878 Dec  8 01:09 adm.valuemapping.php
            -rwxr-x---.  1 zabbix zabbix  2947 Dec  8 01:09 adm.workingtime.php
            drwxr-x---.  4 zabbix zabbix  4096 Dec  8 01:11 api
            -rwxr-x---.  1 zabbix zabbix  1689 Dec  8 01:09 api_jsonrpc.php
            -rwxr-x---.  1 zabbix zabbix 10374 Dec  8 01:09 applications.php
            drwxr-x---.  2 zabbix zabbix  4096 Dec  8 01:11 audio
            -rwxr-x---.  1 zabbix zabbix  4676 Dec  8 01:09 auditacts.php
            -rwxr-x---.  1 zabbix zabbix  6909 Dec  8 01:09 auditlogs.php
            -rwxr-x---.  1 zabbix zabbix  7210 Dec  8 01:09 authentication.php
            -rwxr-x---.  1 zabbix zabbix  1124 Dec  8 01:09 browserwarning.php
            -rwxr-x---.  1 zabbix zabbix  4407 Dec  8 01:09 chart2.php
            -rwxr-x---.  1 zabbix zabbix  5764 Dec  8 01:09 chart3.php
            -rwxr-x---.  1 zabbix zabbix  6466 Dec  8 01:09 chart4.php
            -rwxr-x---.  1 zabbix zabbix  6218 Dec  8 01:09 chart5.php
            -rwxr-x---.  1 zabbix zabbix  3524 Dec  8 01:09 chart6.php
            -rwxr-x---.  1 zabbix zabbix  3502 Dec  8 01:09 chart7.php
            -rwxr-x---.  1 zabbix zabbix 20592 Dec  8 01:09 chart_bar.php
            -rwxr-x---.  1 zabbix zabbix  2979 Dec  8 01:09 chart.php
            -rwxr-x---.  1 zabbix zabbix  4890 Dec  8 01:09 charts.php
            drwxr-x---.  2 zabbix zabbix  4096 Dec  8 01:11 conf
            -rwxr-x---.  1 zabbix zabbix  5608 Dec  8 01:09 conf.import.php
            -rwxr-x---.  1 zabbix zabbix   162 Dec  8 01:09 css.css
            -rwxr-x---.  1 zabbix zabbix 14908 Dec  8 01:09 dashboard.php
            -rwxr-x---.  1 zabbix zabbix  8882 Dec  8 01:09 dashconf.php
            -rwxr-x---.  1 zabbix zabbix  9727 Dec  8 01:09 discoveryconf.php
            -rwxr-x---.  1 zabbix zabbix  4425 Dec  8 01:09 discovery.php
            -rwxr-x---.  1 zabbix zabbix 15162 Dec  8 01:09 disc_prototypes.php
            -rwxr-x---.  1 zabbix zabbix 24411 Dec  8 01:09 events.php
            drwxr-x---.  2 zabbix zabbix  4096 Dec  8 01:11 fonts
            -rwxr-x---.  1 zabbix zabbix 20265 Dec  8 01:09 graphs.php
            -rwxr-x---.  1 zabbix zabbix  6411 Dec  8 01:09 history.php
            -rwxr-x---.  1 zabbix zabbix 12414 Dec  8 01:09 host_discovery.php
            -rwxr-x---.  1 zabbix zabbix  9923 Dec  8 01:09 hostgroups.php
            -rwxr-x---.  1 zabbix zabbix  4516 Dec  8 01:09 hostinventoriesoverview.php
            -rwxr-x---.  1 zabbix zabbix  9503 Dec  8 01:09 hostinventories.php
            -rwxr-x---.  1 zabbix zabbix  5409 Dec  8 01:09 host_screen.php
            -rwxr-x---.  1 zabbix zabbix 29678 Dec  8 01:09 hosts.php
            -rwxr-x---.  1 zabbix zabbix 16530 Dec  8 01:09 httpconf.php
            -rwxr-x---.  1 zabbix zabbix 10207 Dec  8 01:09 httpdetails.php
            -rwxr-x---.  1 zabbix zabbix 10212 Dec  8 01:09 httpmon.php
            -rwxr-x---.  1 zabbix zabbix  1887 Dec  8 01:09 image.php
            drwxr-x---.  6 zabbix zabbix  4096 Dec  8 01:11 images
            -rwxr-x---.  1 zabbix zabbix  3146 Dec  8 01:09 imgstore.php
            drwxr-x---.  4 zabbix zabbix  4096 Dec  8 01:11 include
            -rwxr-x---.  1 zabbix zabbix  3747 Dec  8 01:09 index.php
            -rwxr-x---.  1 zabbix zabbix 44433 Dec  8 01:09 items.php
            drwxr-x---.  4 zabbix zabbix  4096 Dec  8 01:11 js
            -rwxr-x---.  1 zabbix zabbix  7791 Dec  8 01:09 jsLoader.php
            -rwxr-x---.  1 zabbix zabbix  7602 Dec  8 01:09 jsrpc.php
            -rwxr-x---.  1 zabbix zabbix 18906 Dec  8 01:09 latest.php
            drwxr-x---. 27 zabbix zabbix  4096 Dec  8 01:11 locale
            -rwxr-x---.  1 zabbix zabbix 16439 Dec  8 01:09 maintenance.php
            -rwxr-x---.  1 zabbix zabbix  5714 Dec  8 01:09 map.php
            -rwxr-x---.  1 zabbix zabbix  4289 Dec  8 01:09 maps.php
            -rwxr-x---.  1 zabbix zabbix  9564 Dec  8 01:09 media_types.php
            -rwxr-x---.  1 zabbix zabbix  4822 Dec  8 01:09 nodes.php
            -rwxr-x---.  1 zabbix zabbix  2760 Dec  8 01:09 overview.php
            -rwxr-x---.  1 zabbix zabbix  5364 Dec  8 01:09 popup_bitem.php
            -rwxr-x---.  1 zabbix zabbix  2258 Dec  8 01:09 popup_httpstep.php
            -rwxr-x---.  1 zabbix zabbix  4531 Dec  8 01:09 popup_media.php
            -rwxr-x---.  1 zabbix zabbix  6766 Dec  8 01:09 popup_period.php
            -rwxr-x---.  1 zabbix zabbix 62302 Dec  8 01:09 popup.php
            -rwxr-x---.  1 zabbix zabbix  4451 Dec  8 01:09 popup_right.php
            -rwxr-x---.  1 zabbix zabbix 21553 Dec  8 01:09 popup_trexpr.php
            -rwxr-x---.  1 zabbix zabbix  3000 Dec  8 01:09 popup_usrgrp.php
            -rwxr-x---.  1 zabbix zabbix  7147 Dec  8 01:09 profile.php
            -rwxr-x---.  1 zabbix zabbix  8736 Dec  8 01:09 proxies.php
            -rwxr-x---.  1 zabbix zabbix  8445 Dec  8 01:09 queue.php
            -rwxr-x---.  1 zabbix zabbix  1276 Dec  8 01:09 report1.php
            -rwxr-x---.  1 zabbix zabbix 10043 Dec  8 01:09 report2.php
            -rwxr-x---.  1 zabbix zabbix  5834 Dec  8 01:09 report3.php
            -rwxr-x---.  1 zabbix zabbix  7516 Dec  8 01:09 report4.php
            -rwxr-x---.  1 zabbix zabbix  6325 Dec  8 01:09 report5.php
            -rwxr-x---.  1 zabbix zabbix  7487 Dec  8 01:09 report6.php
            -rwxr-x---.  1 zabbix zabbix  9008 Dec  8 01:09 screenconf.php
            -rwxr-x---.  1 zabbix zabbix 11026 Dec  8 01:09 screenedit.php
            -rwxr-x---.  1 zabbix zabbix  5785 Dec  8 01:09 screens.php
            -rwxr-x---.  1 zabbix zabbix  2220 Dec  8 01:09 scripts_exec.php
            -rwxr-x---.  1 zabbix zabbix  9779 Dec  8 01:09 scripts.php
            -rwxr-x---.  1 zabbix zabbix 12959 Dec  8 01:09 search.php
            -rwxr-x---.  1 zabbix zabbix 14089 Dec  8 01:09 services.php
            -rwxr-x---.  1 zabbix zabbix  4969 Dec  8 01:09 setup.php
            -rwxr-x---.  1 zabbix zabbix  6720 Dec  8 01:09 slideconf.php
            -rwxr-x---.  1 zabbix zabbix  9152 Dec  8 01:09 slides.php
            -rwxr-x---.  1 zabbix zabbix  6056 Dec  8 01:09 srv_status.php
            drwxr-x---.  3 zabbix zabbix  4096 Dec  8 01:11 styles
            -rwxr-x---.  1 zabbix zabbix  7690 Dec  8 01:09 sysmap.php
            -rwxr-x---.  1 zabbix zabbix 11881 Dec  8 01:09 sysmaps.php
            -rwxr-x---.  1 zabbix zabbix 19140 Dec  8 01:09 templates.php
            -rwxr-x---.  1 zabbix zabbix  3273 Dec  8 01:09 tr_comments.php
            -rwxr-x---.  1 zabbix zabbix  5300 Dec  8 01:09 tr_events.php
            -rwxr-x---.  1 zabbix zabbix 12982 Dec  8 01:09 trigger_prototypes.php
            -rwxr-x---.  1 zabbix zabbix 16172 Dec  8 01:09 triggers.php
            -rwxr-x---.  1 zabbix zabbix 13942 Dec  8 01:09 tr_logform.php
            -rwxr-x---.  1 zabbix zabbix 28455 Dec  8 01:09 tr_status.php
            -rwxr-x---.  1 zabbix zabbix  6431 Dec  8 01:09 tr_testexpr.php
            -rwxr-x---.  1 zabbix zabbix 15145 Dec  8 01:09 usergrps.php
            -rwxr-x---.  1 zabbix zabbix 14756 Dec  8 01:09 users.php
            -rwxr-x---.  1 zabbix zabbix  2254 Dec  8 01:09 warning.php

            Comment

            • tchjts1
              Senior Member
              • May 2008
              • 1605

              #7
              Ok... I was wrong. chmod 750 won't do it. I just tested that on my system and couldn't see anything. chmod your /var/www/html/zabbix dir to 755 and try viewing again.

              Comment

              • pat_trick
                Junior Member
                • Feb 2013
                • 11

                #8
                OK, just did a chmod to 755 and the same error is still occurring.

                As a thought, do I need to specify the /var/www/html/zabbix directory as a virtual site in the Apache conf?

                Comment

                • pat_trick
                  Junior Member
                  • Feb 2013
                  • 11

                  #9
                  As a note, I also tried adding the Zabbix user to the Apache group as a trial. Still no go. Gonna try setting this up on the Debian box that I have to see if it's an isolated issue to CentOS.

                  Comment

                  • tchjts1
                    Senior Member
                    • May 2008
                    • 1605

                    #10
                    Originally posted by pat_trick
                    OK, just did a chmod to 755 and the same error is still occurring.

                    As a thought, do I need to specify the /var/www/html/zabbix directory as a virtual site in the Apache conf?
                    I don't believe that you have to... but we do it here.

                    Comment

                    • pat_trick
                      Junior Member
                      • Feb 2013
                      • 11

                      #11
                      OK, I was finally able to track down this issue.

                      By default, CentOS comes with SELinux enabled to "enforcing", which prevents access to certain directories that the system views as being a security breach.

                      The solution is to set SELinux to "permissive" or to disable it entirely (not recommended). I'm not an SELinux guru, but I'm sure someone who is could spell out how to configure it specifically to allow access for Apache.

                      Regardless, after setting SELinux to "permissive" on the system, I was successfully able to access http://<server_ip>/zabbix/ and continue with the configuration.

                      A note in the notes may need to be made to this regard for the installation in Section 3 when copying the files over into the root directory for Apache.

                      Comment

                      • tchjts1
                        Senior Member
                        • May 2008
                        • 1605

                        #12
                        Thanks for the follow-up. I should have thought of that as we ran into that issue awhile back. When we did, we simply disabled selinux here, and I hadn't thought about it since. It also wreaked havoc with our Java gateway setup.

                        Comment

                        Working...