[D7] Add wrappers to fix permission checks

Created on 25 January 2013, about 12 years ago
Updated 6 June 2024, 8 months ago

Right now Drupal is unusable with filesystem (POSIX) ACLs. It's been broken for years. This was previously πŸ› ./sites/default/files directory permission check is incorrect during install AND status report (affects Docker on Windows) Needs work 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.

πŸ› Bug report
Status

Postponed

Version

7.0 ⚰️

Component
File systemΒ  β†’

Last updated 2 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States orlitzky

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024