Description
I notice there have been quite a few issues with clearing the cashe with the "php bin/console cache:clear --env=prod" command. I have the same issue and I am running Virtual Box with a windows host and a Linux (RHEL) guest, with the web files stored on the host using a Virtual Box share under Guest Additions. When I run the command it will come up with the error that the rmdir command could not be run on dir xyz (this dir changes every time) as it is not empty.
I have mucked around with the rm command in RHEL on the shared folder (stored on the host) and found it is the '/var/cache/pro~' dir that is causing the issues (even though it normally says in the error it is a sub directory of it).
After a bit more mucking around, I found it is the ~ character causing the issues. I'm not sure if this will cause issues if the web server is also on windows (is someone able to check this), but it will be an issue if you are using a server on a UNIX based system and storing your files on a windows file system.