Closed (fixed)
Project:
Drupal core
Version:
main
Component:
asset library system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Nov 2023 at 09:41 UTC
Updated:
9 Mar 2026 at 05:40 UTC
Jump to comment: Most recent
Comments
Comment #2
cilefen commentedThat looks like a file system permissions setup on your end.
Comment #3
nithya g commentedHi Cilefen, thanks for the response.
We changed permissions also but no luck. We are receiving this error for all the D10 websites.
Someone please help me on this to fix the issue.
Comment #4
cilefen commentedDescribe what you did to change permissions.
Comment #5
omd commentedalso getting this but for css files:
[warning] unlink(/var/www/html/drupal/web/sites/default/files/css/css_1z7ocSf16eu4BoccT48egFpGZBXEN9bc.css.gz): Permission denied FileSystem.php:124
also happening for two sites just updated to Drupal 10.
Comment #6
nicxvan commentedThis is also occurring for me for two sites that I've updated to Drupal 10.
Both of them use Jenkins for deployment. At first I thought it was a conflict between the user running apache and the user running drush commands on the server, but I think something else changed.
As a workaround I've been calling these two commands before all cache clears:
'sudo chmod -R 777 /var/www/site.com/web/sites/default/files/css' || true
'sudo chmod -R 777 /var/www/site.com/web/sites/default/files/js' || true
This obviously is less than ideal and fragile, if a file gets cached between that call and cr it will still fail.
There does seem to be something up with the assets schema change cause this occurred for two separate sites as soon as I updated them to Drupal 10, both sites have been deploying for years before hand.
Here are the file permissions for the css files: -rw-rw-r-- 1 www-data www-data
They are the same for the js files.
I'm not sure what the permissions used to be, but the drush user used to be able to delete cached css files and js files.
Comment #7
nicxvan commentedTo add some more detail, one of the hosts tried to set umask for those directories I think to allow the drush user to be able to delete, but they said cause it's a nfs mount point the umask settings were not taking affect.
I thought I had double checked that the deployment user for the other site was part of the www-data group, but it may not have been. I manually added the deployment user to www-data again and tested without the workaround and the deployment worked so I'll open a ticket with the other hosting provider to add the user to the apache group. Hopefully this helps other users with the same issue.
I still think something changed cause these deployments worked before the update to Drupal 10.
Comment #8
cilefen commentedDrupal 10.1.0 introduced a new asset aggregation system. There have been a few issues resulting from that change.
Comment #9
nicxvan commentedYeah the two sites that had issues are on 10.1. My question was more around did the asset change also change the permissions of the files that are generated.
Comment #10
cilefen commentedIt did affect things like that on some platforms and in some setups. Probably one of those recent issues I linked is about some aspect of that.
Comment #12
rick bergmann commentedI had the same issue after updating from Drupal 9 to 10. I found that
sites/default/files/cssandsites/default/files/jshad incorect ownership ofwww-data:www-data. I changed ownership touser:www-datato fix the issue.Comment #13
mdsohaib4242 commentedTry turning off aggregation in the settings.php file
Or a workaround would be to manually search and delete the .js file.
Comment #14
rick bergmann commentedI still have this issue. I see it is because for some reason Drupal is changing the ownership of the
sites/default/files/jsandsites/default/files/cssdirectories back towww-data:www-datawhen it generates new aggregated css/js files. This is on my prod server so I need to keep aggregation enabled.Comment #15
orkutmuratyilmazComment #16
orkutmuratyilmazCan we migrate this issue to drush project?
Comment #17
cilefen commentedNo, because Drush issues are on Github. You can open an issue there and include the issue link in a comment here.
Comment #19
quietone commentedThere is a related bug report for this where any further discussion should happen. I have updated the Issue summary with the comments that have possible solutions.
The Drupal Core issue queue is not the ideal place for support requests. The 'support request' option is there for filing support issues for contributed modules and themes. There are several support options listed on our Support page, including the Drupal Forums and Drupal Answers. There is also Drupal Slack. You may get better replies in one of those places.
I am closing this per the guidance in Handle or refer a support request in an issue.