0

I am having problems with the permissions of the cache folder. Once I reset the permissions to Nobody everything works just fine but when a new cache file is created it uses the root user and certain CiviCRM pages do not load because of that (ex. the contact search). Is there a way to define or force the user to be "nobody"?

Thank you in advance.

1 Answer 1

0

Is your webserver running as user 'nobody'? You have something running as root that is causing the cache to be rebuilt - like using cv as root. Are your cron scheduled jobs running as root?

You have two basic approaches: either get everything that causes a rebuild to run as the webserver user ('nobody'), or arrange for all the users to have access to the cache directory.

One option for doing that is using Linux file ACL's with setfacl. You can look at how buildkit uses setfacl for an example, but there's nothing Civi-specific.

Something like this should ensure your webserver user has access to the cache files:

$ setfacl -R -m d:u:nobody:rwX,u:nobody:rwX cache_dir
1
  • Hello Aidan, Thank you for your quick and detailed response and your time. I will try to sort out the server permissions.
    – Evan
    Nov 17, 2022 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.