Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 300693

Add wrappers to fix permission checks

$
0
0

Right now Drupal is unusable with filesystem (POSIX) ACLs. It's been broken for years. This was previously #944582: ./sites/default/files directory permission check is incorrect during install AND status report and #1333390: file_prepare_directory() / is_writable() on Linux don't support ACLs which are/were doomed to failure.

Steps to reproduce in Drupal 7 (change apache to your web server user):

  1. Build a clean Drupal 7 development environment
  2. In /sites/default:
    • mkdir files
    • chmod -R 700 files
    • setfacl -R -m user:apache:rwx files/
    • setfacl -Rd -m user:apache:rwx files/
  3. Install Drupal
  4. Do anything that calls file_prepare_directory('public://', FILE_CREATE_DIRECTORY). For instance, install the IMCE module and open its file browser from your "My Account" page.

Anything that calls file_prepare_directory('public://', FILE_CREATE_DIRECTORY) will fail, claiming that the directory (sites/default/files) is not writable.


Viewing all articles
Browse latest Browse all 300693

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>