Ad Widget

Collapse

Assets cache directory is not writable.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wifi75
    Member
    • Apr 2018
    • 45

    #1

    Assets cache directory is not writable.

    Hello on my server centos after last zabbix server update, isn't to possbile login...
    what can I do?

    Attached Files
  • edwardcc
    Junior Member
    • May 2019
    • 5

    #2
    Same problem here, ubuntu 1804, and rpi
    updating from 4.0.7 to 4.0.8

    using google the only thing I can find is

    which says
    "Since Zabbix 4.2.2, write permissions to the assets directory are required for the web server user."

    I can find the file is added here

    Comment

    • kosmas
      Junior Member
      • May 2019
      • 1

      #3
      Same here!
      Two CentOS 7 updated to 4.0.8-1 both have the same problem.
      Insufficient file system permissions.
      • Assets cache directory is not writable.

      Comment

      • ma-kom
        Junior Member
        • May 2019
        • 4

        #4
        Did the trick for me:
        sudo chmod -R 777 /usr/share/zabbix/assets

        Comment

        • senatorfoo
          Junior Member
          • May 2019
          • 1

          #5
          Originally posted by ma-kom
          Did the trick for me:
          sudo chmod -R 777 /usr/share/zabbix/assets
          777 is not ideal for just about anything. Change the ownership of the directory to the frontend and leave it at 755. Debian would be www-data

          chown www-data:www-data /usr/share/zabbix/assets

          Comment

          • efisher
            Junior Member
            • May 2019
            • 2

            #6
            Originally posted by ma-kom
            Did the trick for me:
            sudo chmod -R 777 /usr/share/zabbix/assets
            That worked for me, but now I'm having an issue where none of the fonts are showing up with the graphs. It seems that I might be missing some assets after upgrading, but not sure. This was upgraded via RPM on Centos 7. Downgrading to 4.0.7 resolves issue, but something is wrong with 4.0.8.

            Comment


            • Pioxis
              Pioxis commented
              Editing a comment
              I have the same issue with that graphs. I had to downgrade from 4.2.2 to 4.2.1.
          • snickerjp
            Junior Member
            • May 2019
            • 1

            #7
            Originally posted by ma-kom
            Did the trick for me:
            sudo chmod -R 777 /usr/share/zabbix/assets
            Only Change
            Code:
            /usr/share/zabbix/assets
            before:
            Code:
            $ ls -ld /usr/share/zabbix/assets
            drwxr-xr-x 6 root root 55 May 29 13:45 /usr/share/zabbix/assets
            $ ls -ld /usr/share/zabbix/assets/*
            drwxr-xr-x 2 root   root      6 May 28 18:27 /usr/share/zabbix/assets/fonts
            drwxr-xr-x 2 root   root   4096 May 29 13:44 /usr/share/zabbix/assets/img
            drwxr-xr-x 2 root   root     85 May 29 13:44 /usr/share/zabbix/assets/styles
            after:
            Code:
            sudo chmod 777 /usr/share/zabbix/assets
            
            $ ls -ld /usr/share/zabbix/assets
            drwxrwxrwx 6 root root 55 May 29 13:45 /usr/share/zabbix/assets
            $ ls -ld /usr/share/zabbix/assets/*
            drwxr-xr-x 4 apache apache   29 May 29 13:45 /usr/share/zabbix/assets/10am2h0 #<- add write from apache
            drwxr-xr-x 2 root   root      6 May 28 18:27 /usr/share/zabbix/assets/fonts
            drwxr-xr-x 2 root   root   4096 May 29 13:44 /usr/share/zabbix/assets/img
            drwxr-xr-x 2 root   root     85 May 29 13:44 /usr/share/zabbix/assets/styles

            because:

            Comment

            • wifi75
              Member
              • Apr 2018
              • 45

              #8
              My server it is Centos 7
              that line to send by terminal are valid?

              Comment


              • kosmas
                kosmas commented
                Editing a comment
                Hi wifi75, the command is valid, but it is not security wise to change the permissions of a directory to 777.
                I have temporarily used this workaround until there is a better and more secure solution.
            • Husnu Demir
              Junior Member
              • May 2019
              • 3

              #9
              Hi,


              cd /usr/share/zabbix/
              chown -R www-data:www-data assets/

              This would be more secure. Apache2 works with www-data user.

              hdemir.

              Comment

              • Pioxis
                Junior Member
                • May 2019
                • 5

                #10
                Originally posted by Husnu Demir
                Hi,


                cd /usr/share/zabbix/
                chown -R www-data:www-data assets/

                This would be more secure. Apache2 works with www-data user.

                hdemir.
                Hello, that option is not working for me.
                I have zabbix on ubuntu and still I don't have fonts for my monitors.

                What I have to do to fix it?

                Comment


                • Pioxis
                  Pioxis commented
                  Editing a comment
                  Fonts for me now working. Folder /assets/fonts was empty and I copied there default font from /zabbix/fonts.
              • wifi75
                Member
                • Apr 2018
                • 45

                #11
                Originally posted by Husnu Demir
                Hi,


                cd /usr/share/zabbix/
                chown -R www-data:www-data assets/

                This would be more secure. Apache2 works with www-data user.

                hdemir.
                not work see below:

                Attached Files

                Comment

                • Husnu Demir
                  Junior Member
                  • May 2019
                  • 3

                  #12
                  OK. I have been using Debian and my apache servers user is www-data. U should use your web user. I found my user like that;


                  # ps -ef | grep apache2
                  root 13905 1 0 May28 ? 00:00:00 /usr/sbin/apache2 -k start
                  www-data 32975 13905 0 06:25 ? 00:00:03 /usr/sbin/apache2 -k start


                  There may be other ways. Change the username with "www-data:www-data"

                  hdemir.


                  Comment

                  • Husnu Demir
                    Junior Member
                    • May 2019
                    • 3

                    #13
                    Also, this may help;

                    https://stackoverflow.com/questions/...wned-by-apache

                    Comment

                    • wts_tim
                      Junior Member
                      • May 2019
                      • 5

                      #14
                      I am currently running CentOS 7, Zabbix updated these four packages last night and no longer able to access the log in page as i see the same error message above.

                      May 29 03:24:38 Updated: zabbix-web-mysql.noarch 4.0.8-1.el7
                      May 29 03:24:40 Updated: zabbix-web.noarch 4.0.8-1.el7
                      May 29 03:24:41 Updated: zabbix-server-mysql.x86_64 4.0.8-1.el7
                      May 29 03:24:41 Updated: zabbix-agent.x86_64 4.0.8-1.el7


                      I have tried changing the permissions to 777 and changing the owner to apache but this makes no difference for my setup.

                      Comment

                      • sph919
                        Member
                        • Jan 2019
                        • 38

                        #15
                        Originally posted by wts_tim
                        I am currently running CentOS 7, Zabbix updated these four packages last night and no longer able to access the log in page as i see the same error message above.

                        May 29 03:24:38 Updated: zabbix-web-mysql.noarch 4.0.8-1.el7
                        May 29 03:24:40 Updated: zabbix-web.noarch 4.0.8-1.el7
                        May 29 03:24:41 Updated: zabbix-server-mysql.x86_64 4.0.8-1.el7
                        May 29 03:24:41 Updated: zabbix-agent.x86_64 4.0.8-1.el7


                        I have tried changing the permissions to 777 and changing the owner to apache but this makes no difference for my setup.
                        What permissions are shown with ls- la /usr/share/zabbix/ ?

                        Comment

                        Working...