How can you change the temporary directory? I migrated the site from the local server to live server. But the images do not appear - the website logo and some PDFs. I've been seeing the problem could be here "Config" >> "file system" and my temporary directory is: /Applications/MAMP/tmp/php because I need to change that. But I do not know how. if you can help me. please


  Warning: move_uploaded_file(temporary://logo_verde_maior.png): failed
  to open stream:
  "Drupal\Core\StreamWrapper\TemporaryStream::stream_open" call failed
  in Drupal\Core\File\FileSystem->moveUploadedFile() (line 81 of
  core/lib/Drupal/Core/File/FileSystem.php).


This is error:


  Warning: move_uploaded_file(): Unable to move '/tmp/php9al1tV' to
  'temporary://logo_verde_maior.png' in
  Drupal\Core\File\FileSystem->moveUploadedFile() (line 81 of
  core/lib/Drupal/Core/File/FileSystem.php). File upload error. Could
  not move uploaded file.
In https://www.drupal.org/node/3039026 / https://www.drupal.org/node/3039255, which was introduced in Drupal 8.8.0, the ability to configure the temp directory was removed from the UI and moved to settings.php.

From the change record:


  The following lines are now in default.settings.php

/**
 * Temporary file path:
 *
 * A local file system path where temporary files will be stored. This directory
 * must be absolute, outside of the Drupal installation directory and not
 * accessible over the web.
 *
 * If this is not set, the default for the operating system will be used.
 *
 * @see \Drupal\Component\FileSystem\FileSystem::getOsTemporaryDirectory()
 */
# $settings['file_temp_path'] = '/tmp';



So, you should edit your settings file.

If your temp directory is different in your environments, you need a mechanism to handle this.  I typically use .env files for this, the database connection info, and some other settings.