Announcement

Collapse
No announcement yet.

Error 500: Cannot save changes

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error 500: Cannot save changes

    Hello,

    I menu Administration\Currency, I'm trying to change a currency rate.
    When i click "Save" the error "Error 500: Cannot save changes" appears.
    I've searched this forum for similar issues and everything suggested i did it but without success.
    In /var/www/html/data/logs/ this error isn't mentioned.
    I've also checked config.php folder permissions and they are OK as described in the documentation.

    I appreciate your help!

    Thank you.
    tsantos

  • #2
    Hi there,
    Please check also the web server's error log file.
    What EspoCRM version do you use?
    Do you have any code customization (.php, .json files)?

    Comment


    • #3
      Originally posted by Maximus View Post
      Hi there,
      Please check also the web server's error log file.
      What EspoCRM version do you use?
      Do you have any code customization (.php, .json files)?
      Hi Maximus,

      I checked the error_log and found this error:
      [Tue Nov 17 00:00:08.149054 2020] [php7:warn] [pid 27464] [client 192.168.50.78:60722] PHP Warning: unlink(data/logs/espo-2020-10-18.log): Permission denied in /var/www/html/application/Espo/Core/Utils/File/Manager.php on line 610, referer: http://espocrm.dssi.pt/

      What kind of permissions does it need?

      The manager.php does not have that reference in line 610.

      What should i do to solve this issue ?

      Comment


      • #4
        It looks like you need to set up properly these permissions https://docs.espocrm.com/administrat...n/#permissions.

        Comment


        • #5
          Originally posted by Maximus View Post
          It looks like you need to set up properly these permissions https://docs.espocrm.com/administrat...n/#permissions.
          I've executed the following command without any errors (I use CentOS):
          cd /var/www/html
          find . -type d -exec chmod 755 {} + && find . -type f -exec chmod 644 {} +;
          find data custom client/custom -type d -exec chmod 775 {} + && find data custom client/custom -type f -exec chmod 664 {} +;
          chmod 775 application/Espo/Modules client/modules;
          chown -R apache:apache application/
          systemctl restart httpd

          Unfortunately, I still get the same "error 500 cant save settings".
          Is there any errors in the above commands or anything else that i can do?

          Thank you Maximus!

          Comment


          • #6
            Hi there,
            sorry for the delayed reply. I've tested it with EspoCRM v.6.0.6 and it works like a charm. Please tell me your EspoCRM version so I could check it and make sure that it is not EspoCRM issue.

            Comment


            • #7
              Originally posted by Maximus View Post
              Hi there,
              sorry for the delayed reply. I've tested it with EspoCRM v.6.0.6 and it works like a charm. Please tell me your EspoCRM version so I could check it and make sure that it is not an EspoCRM issue.
              Hi Maximus,

              The version of our EspoCRM is "Current version: 5.9.2".
              We gonna schedule an upgrade to see if it solves the issue later today.

              Thank you for your help on this issue

              Comment


              • #8
                We have upgraded to 6.0.6 and run the same commands that we have posted in the previous thread but we still get the same error 500 cant save settings
                Are there any logs you want me to send?

                Thanks

                Comment


                • #9
                  Our config.php has the following permissions:

                  [root@localhost defaults]# ll /var/www/html/data/
                  drwxrwxr-x. 3 apache apache 25 Nov 26 10:19 cache
                  -rw-rw-r-- 1 root root 7593 Nov 25 18:14 config.php
                  drwxrwxr-x. 2 root root 4096 Nov 26 00:01 logs
                  drwxrwxr-x 2 root root 6 Nov 26 10:20 tmp
                  drwxrwxr-x. 5 apache apache 28672 Nov 26 09:45 upload

                  Does the file config.php have the correct permissions and owner?

                  Thank you.

                  Comment


                  • #10
                    Hi,
                    > Does the file config.php have the correct permissions and owner?

                    Definitely not. All files and folders of EspoCRM system should be owned and group-owned by the webserver user https://docs.espocrm.com/administrat...ion/#ownership. I believe in your case it is `apache`

                    Comment


                    • #11
                      Hello,

                      After running the command "chown apache:apache config.php" in /var/www/html/data/ the error has finally disappeared.
                      Thank you Maximus!


                      Comment

                      Working...
                      X