drupalfile-permissionsdrupal-10

How to Clear "Private files "Not fully protected" error in status report


I am trying to get rid of the Private files "Not fully protected" error in the Drupal 10 status report.

Added $settings['file_private_path'] = $app_root . '/../private'; to settings.php.

Created a folder named "private" at the same level as web folder.

Set folder owner to www-data

Tried everything recommend at the Drupal issues page about this at https://www.drupal.org/project/drupal/issues/2953336.

The error still shows in the status report. I am not allowing users to upload files, I just want the error to go away.


Solution

  • permission must be "private" directory has permissions set to 750 or 770 and is owned by the web server user

    (www-data for apache) use the next

    sudo chmod -R 750 /path/to/private
    sudo chown -R www-data:www-data /path/to/private
    

    clear the cache after that using drush cr