cancel
Showing results for 
Search instead for 
Did you mean: 

Cache directory: how Magento file system owner and Apache user can work together?

Cache directory: how Magento file system owner and Apache user can work together?

Hi,

 

I'm facing a tricky issue since the day I installed Magento 2.3.0.

 

In my case, Magento is served by an Apache server, so that Magento writes directories/files in the var/cache/ directory, which belong to the www-data user.

 

On the other hand, when flushing the cache with the CLI, the Magento file owner (in my case, ubuntu) obviously needs to have write permission on var/cache sub-directories, otherwise the cash won't flush properly.

 

And the isue is right here. The ubuntu user can't write on directories which, in turn, have been created by the www-data user and therefore belong to him!

 

Any help would be greatly appreciated...

1 REPLY 1

Re: Cache directory: how Magento file system owner and Apache user can work together?

Hi @david_iux,

 

Maybe this document can help a little bit to check how to configure your server: https://devdocs.magento.com/guides/v2.3/config-guide/prod/prod_file-sys-perms.html