Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

285
Views
Strange file/folder permission errors on Drupal 8.8.5

I'm facing very strange behaviour on Drupal 8.8.5, CentOS Linux release 7.5.1804, PHP 7.2.19 and HTTPD - Apache/2.4.6

Basically, after updating to 8.8.5 (that has been a real headache), the system throws errors while flushing css+js files on "flush caches".

Drupal\Core\File\Exception\FileException: Failed to unlink file 'public://css/css_Y3zRgmC0P7yIXk_w_H9qyrPs3aMkKRv44SMfupbSCMc.css.gz'. in Drupal\Core\File\FileSystem->delete() (line 340 of/var/www/html/project/core/lib/Drupal/Core/File/FileSystem.php).

Warning: unlink(/var/www/html/project/sites/default/files/css/css_Y3zRgmC0P7yIXk_w_H9qyrPs3aMkKRv44SMfupbSCMc.css.gz): Permission denied in Drupal\Core\File\FileSystem->unlink() (line 124 of /var/www/html/synergie/core/lib/Drupal/Core/File/FileSystem.php)

This obviously leads to bad frontend and admin panel behaviour.

I've literally tried to do everything I could, by:

  1. Setting all 777 to /var/www/html/project/sites/default and subdirectories
  2. Changing owner of the directory aforementioned
  3. Manually debugging lines 124 and 340 of lib/Drupal/Core/File/FileSystem.php

What I've found very strange, is that by manually debugging the unlink method on FileSystem.php, it lead to some strange results:

public://css/css_Y3zRgmC0P7yIXk_w_H9qyrPs3aMkKRv44SMfupbSCMc.css.gz: readable and writable

/var/www/html/project/sites/default/files/css/css_Y3zRgmC0P7yIXk_w_H9qyrPs3aMkKRv44SMfupbSCMc.css.gz: readable but not writable

Some notes: - Httpd runs on apache user and apache group

  • I've tried to do every possible combination of folder and write permission and owner and group to every directory and child subdirectories of /var/www/html/project/sites/

  • I've already tried to follow these instructions: Web Archive

  • I've also run this "folder and file permissions script": Drupal Website

Do you have ideas or suggestions? I cannot go past this one

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

Sounds like SELinux blocking...

Find current mode of SELinux and temporarily shut it down.

Getenforce # see current mode.
Sudo setenforce 0 # shut it down.

Try your thing. If that’s cause, just add rule to allow locations like /var/www/your Docroot

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!