Drush does not seem to be able to move files to the tmp folder on my local machine. Changing the tmp folder location to for instance "sites/default/files" works, but I would like to know why it doesn't work with /tmp.
I am using this script from the fontawesome module:
$this->fileSystem->move($path . '/fontawesome-free-' . $fontawesome_library['version'] . '-web', $this->fileSystem->getTempDirectory() . '/temp_fontawesome', FileSystemInterface::EXISTS_REPLACE);
and I get the error
The specified file '/home/username/websites/frilaering_newest/web/libraries/fontawesome/fontawesome-free-6.1.0-web' could not be moved to '/tmp/temp_fontawesome'.
The weird thing is that everything else seems to work - including file uploads, which uses the tmp folder - so can this be related to Drush somehow? I'm using Drush installed on the local website with composer. Everything looks fine in Drush status.
- www-data can write to /tmp
- /tmp is chmodded to 777
- .htaccess file is present in /tmp folder
- settings.local.php has "$settings["file_temp_path"] = '/tmp';"
I have tried anything - even fiddling with PrivateTmp, but the only thing that works is changing the tmp folder, which I would rather avoid.
I am using Drupal 9 with php7.3-fpm/apache2/mariaDB on latest Ubuntu