Open
Description
Description
The following code:
<?php
$source = '/media/sf_source/text.txt';
$destination = '/media/sf_destination/text.txt';
copy($source, $destination);
Resulted in this output:
/media/sf_destination/text.txt is an empty 0 bytes file.
How to replicate
php is running in the guest and tries to copy a file from a shared folder to an other shared folder.
Permissions are ok on the source and destination.
I tried to activate/disable the option "Host Input/Output Caching" of VirtualBox. There is no visible impact.
Environnement
Host: Windows 10 running VirtualBox 7.0.12
Guest: Ubuntu 20.04.
Workaround
<?php
file_put_contents('/media/sf_destination/text.txt', file_get_contents('/media/sf_source/text.txt'));
Related?
PHP Version
PHP 8.3.0
Operating System
Ubuntu 20.04 + Windows 10