84

Как правильно указать временную папку Drupal 8

Первый путь через Drush (я так понял, что устарел):

drush -y config:set system.file path.temporary /home/admin/tmp

Это был альтернативный ход указания пути к tmp через админку > Файловая система. Устарело. Теперь указывается через

$settings["file_temp_path"] = "/tmp" 

в файле настроек settings.php. Я указываю полный путь до tmp-папки начиная от корневой папки /home. Файл .htaccess добавляется автоматически Drupal'ом. Его содержание:

# Turn off all options we don't need.
Options -Indexes -ExecCGI -Includes -MultiViews

# Set the catch-all handler to prevent scripts from being executed.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006

  # Override the handler again if we're run later in the evaluation list.
  SetHandler Drupal_Security_Do_Not_Remove_See_SA_2013_003

# If we know how to do it safely, disable the PHP engine entirely.

  php_flag engine off

Здесь также указано вот что: Additionally, the .htaccess of the temporary files directory and private files directory (if used) should include this command:

Deny from all

Ограниченный HTML

  • Допустимые HTML-теги: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Строки и абзацы переносятся автоматически.
  • Адреса веб-страниц и email-адреса преобразовываются в ссылки автоматически.
CAPTCHA