After change the server, cannot change the layout : error 500 while saving the layout

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nishan Perera
    Active Community Member
    • Jan 2019
    • 348

    After change the server, cannot change the layout : error 500 while saving the layout

    Hi,

    After change the server, cannot change the layout and im getting error 500 while saving the layout in the browser. Please refer the below error log. im using version 5.5.5.


    "Unable to create file data/logs/espo-2019-02-08.log because Permission denied in /var/www/html/CRM/application/Espo/Core/Utils/File/Manager.php on line 505"


    permissions are according to order.
    Cheers!
    Nishan.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hello,
    check please if everything according to this https://www.espocrm.com/documentatio...nother-server/. Pay attention to step 8.

    Comment

    • Nishan Perera
      Active Community Member
      • Jan 2019
      • 348

      #3
      Hello,

      im my config.php file has not the below config data :


      Code:
       
        'defaultPermissions' => [         'user' => 'www-data',         'group' => 'www-data'     ]
      is it the issue ? if it is, can you let me know how to insert that part to the config.php file.
      Cheers!
      Nishan.

      Comment

      • tanya
        Senior Member
        • Jun 2014
        • 4308

        #4
        Do you have this user and group on the new server?
        check access to data/logs folder

        Comment

        • Nishan Perera
          Active Community Member
          • Jan 2019
          • 348

          #5
          Hi Tanya,

          I don't have this user (www-data) in my new server.

          also find the data/log permisions.

          [xxxx@xxxxxxxxxxxxxx data]# ll
          total 2448
          drwxrwxr-x. 4 apache apache 4096 Jan 29 15:31 cache
          -rwxrwxr-x. 1 apache apache 6190 Feb 8 18:16 config.php
          drwxrwxr-x. 2 apache apache 4096 Jan 31 12:11 logs
          drwxrwxr-x. 3 apache apache 4096 Jan 29 15:31 upload

          Cheers!
          Nishan.

          Comment

          • Maximus
            Senior Member
            • Nov 2018
            • 2731

            #6
            Read here https://www.espocrm.com/documentatio...-based-systems. All files should be owned and group-owned by the webserver process. It can be “www-data”, “daemon”, “ apache ”, “www”, etc. So you need to define your webserver user. It is very similar that it is apache. Try to change user :group owner permission from www-data to apache. Wich user :group owner was previously? Also, try to define all permissions again according to this
            To set the permissions, execute these commands in the terminal:
            cd <PATH-TO-ESPOCRM-DIRECTORY>
            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;

            Comment

            • sequencer
              Junior Member
              • Apr 2024
              • 16

              #7
              I've found www-data in

              cat /etc/group

              and changing owner fixed the issue
              pwd
              /var/www/html​
              sudo chown -R www-data:www-data ./

              Comment

              • emillod
                Active Community Member
                • Apr 2017
                • 1405

                #8
                sequencer to set proper permissions, in the future check this commands: Configuration - EspoCRM Documentation

                Comment

                • sequencer
                  Junior Member
                  • Apr 2024
                  • 16

                  #9
                  emillod, I've mentioned literally the same (what was in docs) in my post. They (permissions) were broken after directory manipulation of some sort.

                  Comment

                  Working...