Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't enable "Use Cache" #12

Closed
vp-lab opened this issue Oct 21, 2021 · 3 comments
Closed

Can't enable "Use Cache" #12

vp-lab opened this issue Oct 21, 2021 · 3 comments

Comments

@vp-lab
Copy link

vp-lab commented Oct 21, 2021

Hi,

After updating espocrm from 7.0.4 to 7.0.7, we can't enable "Use Cache" in Settings.
Screenshot from 2021-10-21 09-49-59

I don't know if it was enable or disable before (on 7.0.4) but on 6.1.9 it was 100% enable use cache.

What we're using:

  • Docker version 20.10.9, build c2ea9bc
  • docker-compose version 1.29.2, build 5becea4c
  • espocrm v 7.0.7
  • AlmaLinux release 8.4 (Electric Cheetah)

I get this error in logs:

[2021-10-20 14:45:56] ERROR: (500) Error while clearing cache; PUT /Settings/1; line: 132, file: /var/www/html/application/Espo/Core/DataManager.php [] []
[2021-10-20 14:46:04] WARNING: E_WARNING: unlink(data/cache/application/cronLastRunTime.php): Permission denied {"code":2,"message":"unlink(data/cache/application/cronLastRunTime.php): Permission denied","file":"/var/www/html/application/E
spo/Core/Utils/File/Manager.php","line":755} []
[2021-10-20 14:46:04] ERROR: (500) Error while clearing cache; PUT /Settings/1; line: 132, file: /var/www/html/application/Espo/Core/DataManager.php [] []
[2021-10-20 14:47:54] WARNING: E_WARNING: unlink(data/cache/application/cronLastRunTime.php): Permission denied {"code":2,"message":"unlink(data/cache/application/cronLastRunTime.php): Permission denied","file":"/var/www/html/application/E
spo/Core/Utils/File/Manager.php","line":755} []
[2021-10-20 14:47:54] ERROR: (500) Error while clearing cache; PUT /Settings/1; line: 132, file: /var/www/html/application/Espo/Core/DataManager.php [] []
[2021-10-20 14:50:14] WARNING: E_WARNING: unlink(data/cache/application/cronLastRunTime.php): Permission denied {"code":2,"message":"unlink(data/cache/application/cronLastRunTime.php): Permission denied","file":"/var/www/html/application/E
spo/Core/Utils/File/Manager.php","line":755} []

I tried to chown data/cache/application/cronLastRunTime.php from root to apache but it'll overwrite again to root.

Thank you.

@tmachyshyn
Copy link
Collaborator

It sounds like your EspoCRM files are owner by wrong user. They should be owner by www-data user.
Did you changed owner of your mapped directory of EspoCRM?

@vp-lab
Copy link
Author

vp-lab commented Nov 16, 2021

In CentOS/Alma/Rocky, www-data user doesn't exist.

I installed a new espocrm container with fresh configuration on another server with Alma 8.4 and it's something wrong about the production one and the test one.

Here's the production one. [it's working fine but I can't enable Cache]
production_crm
Only one file it's here compared to the test one where are lots of them.

Here's the test one, fresh install.
test_crm

33:tape , it's the ID for user www-data in ubuntu.

@tmachyshyn
Copy link
Collaborator

Sorry for the late reply.
Try to correct the user and group in the data/config-internal.php under defaultPermissions section.
Then set the owner recursively.

Also, please let me know your configuration of cron / daemon to run Scheduled Jobs?
Is it something like below:

espocrm-daemon:
    image: espocrm/espocrm
    container_name: espocrm-daemon
    volumes:
      - espocrm:/var/www/html
    restart: always
    entrypoint: docker-daemon.sh

@vp-lab vp-lab closed this as completed Jan 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants