File permissions
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
This module provides 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 variables table, 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 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. The CTools CSS cache directory, ctools/css could not be created due
to a mis-configured files directory. Please ensure that the files directory
is correctly configured and that the web server has permission to create
directories.Installation
- Download module to your
~/.drushfolder:drush dl file_permissions-8.x --destination=~/.drush - Run
drush cc drushto clear Drush cache.
How To Use It
By simply running drush fp
It is not recommended to use it with sudo as it will create ~/.drush/cache files that are owned by root user.
Drupal 8
This module now supports Drupal 8 and it's backwards compatible with earlier Drupal versions, and use version 8.x is recommended.
Note
Because this is all about permissions, a root user is required, that's why it will ask you for root password and sudo access is needed.
