Drupal is a registered trademark of Dries Buytaert
drupal 11.3.7 Update released for Drupal core (11.3.7)! drupal 11.2.11 Update released for Drupal core (11.2.11)! drupal 10.6.7 Update released for Drupal core (10.6.7)! drupal 10.5.9 Update released for Drupal core (10.5.9)! cms 2.1.1 Update released for Drupal core (2.1.1)! drupal 11.3.6 Update released for Drupal core (11.3.6)! drupal 10.6.6 Update released for Drupal core (10.6.6)! cms 2.1.0 Update released for Drupal core (2.1.0)! bootstrap 8.x-3.40 Minor update available for theme bootstrap (8.x-3.40). menu_link_attributes 8.x-1.7 Minor update available for module menu_link_attributes (8.x-1.7). eca 3.1.1 Minor update available for module eca (3.1.1). layout_paragraphs 2.1.3 Minor update available for module layout_paragraphs (2.1.3). ai 1.3.3 Minor update available for module ai (1.3.3). ai 1.2.14 Minor update available for module ai (1.2.14). node_revision_delete 2.0.3 Minor update available for module node_revision_delete (2.0.3). moderated_content_bulk_publish 2.0.52 Minor update available for module moderated_content_bulk_publish (2.0.52). klaro 3.0.10 Minor update available for module klaro (3.0.10). klaro 3.0.9 Minor update available for module klaro (3.0.9). layout_paragraphs 2.1.2 Minor update available for module layout_paragraphs (2.1.2). geofield_map 11.1.8 Minor update available for module geofield_map (11.1.8).

file_permissions

12 sites Security covered
View on drupal.org

Please note THIS IS NOT A UI MODULE. IT PROVIDES DRUSH COMMANDS ONLY. Please follow instructions below.

This is a set of drush commands for setting up correct file permissions in your Drupal instance. It takes care of creating sites/default/files and sites/default/private on your Drupal installation and updating them in config, so you don't have to do that through the UI. It also takes care of creating .htaccess files in those subdirectories. But most importantly it maintains correct permissions on those directories.

When would you need this?

You might be seeing one of the below notices:

The directory sites/default/files is not writable.
The directory sites/default/private is not writable.
You may need to set the correct directory at the file system settings page
or change the current directory's permissions so that it is writable.

Requirements

  • Drupal 9, 10 or 11
  • Drush 10, 11, 12 or 13

Installation

  1. Download module using Composer:
    composer require drupal/file_permissions
  2. Enable the module:
    drush en file_permissions

How To Use It

By simply running drush fp

Optionally, if auto-detection of the web server user and group fails, you can
provide them manually:
drush fp --user=www-data --group=www-data

To preview changes without applying them:
drush fp --dry-run

It is not recommended to use it with sudo as it
will create files owned by the root user.

Note

Because this is all about permissions, a root user is required, that's why it will ask you for sudo access.

Activity

Total releases
8
First release
Feb 2026
Latest release
1 month ago
Release cadence
0 days
Stability
63% stable

Release Timeline

Releases

Version Type Release date
2.1.3 Stable Feb 28, 2026
2.1.2 Stable Feb 28, 2026
2.1.1 Stable Feb 27, 2026
2.1.0 Stable Feb 27, 2026
2.0.0 Stable Feb 27, 2026
2.0.0-beta3 Pre-release Feb 27, 2026
2.0.0-beta2 Pre-release Feb 26, 2026
2.0.0-beta1 Pre-release Feb 26, 2026