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...