Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

php - Issue unlink with Drupal 9.0.3

I'm new here, i have a problem with Drupal 9.0.3 and I'm not that much of a Drupal expert either. The problem is this: after i do "drush cache-rebuild", this happen

[warning] unlink(/bitnami/drupal/sites/default/files/css/css_GBUUzqz5ceINiDlSQ1o7Z8ZvirKTZAlcfXIJ2cvHW6Q.css.gz): Permission denied FileSystem.php:124In FileSystem.php line 324:                                                                               Failed to unlink file 'public://css/css_GBUUzqz5ceINiDlSQ1o7Z8ZvirKTZAlcf    XIJ2cvHW6Q.css.gz'.  

I also tried to play a bit with the permissions but nothing happens. I honestly don't know which module or modification of the last ones will have led to this sudden error. Thank you for all kinds of support.

question from:https://stackoverflow.com/questions/65917048/issue-unlink-with-drupal-9-0-3

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You got that warning because the user you are logged in does not have write permission on the folder /bitnami/drupal/sites/default/files/css/. So, drush (running as that user) cannot delete the aggregated css files while rebuilding the cache.

To solve this, you need to set the permissions of that folder to 775 and make sure that the user you are logged in with belongs to the group-owner of it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...