Make WordPress Core

Opened 5 months ago

Last modified 2 weeks ago

#63771 new defect (bug)

Access denied issue with wp-includes/css/dist folder in WordPress 6.8.1-6.8.3

Reported by: 369work's profile 369work Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.8.3
Component: Administration Keywords: css dist file-permissions windows access-denied
Focuses: Cc:

Description

## Problem Description
WordPress 6.8.1 deployment creates wp-includes/css/dist folder with abnormal file attributes on Windows, making deletion/editing impossible and causing CSS loading failures in site-editor.php.

## Environment

  • OS: Windows 11
  • WordPress Version: 6.8.1
  • Web Server: MAMP
  • PHP Version: 8.2
  • Package: wordpress-6.8.1.zip (deployed July 13, 2025)

## Steps to Reproduce

  1. Download wordpress-6.8.1.zip package
  2. Extract ZIP file to target directory
  3. Install/deploy WordPress 6.8.1 on Windows environment
  4. Access wp-admin and open Theme Editor
  5. Begin editing block theme in Site Editor
  6. Notice CSS styling suddenly breaks during editing session
  7. Open browser developer tools to debug
  8. Observe CSS files from wp-includes/css/dist fail to load
  9. Navigate to wp-includes/css/dist in Windows Explorer
  10. Attempt to access folder - "Access denied" error occurs
  11. Try to delete or modify folder/files - all operations fail with permission errors

## Expected Result
Folder should be deletable with normal permissions

## Actual Behavior

  • All 130+ files in dist folder are completely undeletable
  • PowerShell Remove-Item fails with "Access denied"
  • icacls permission reset fails with "Access denied"
  • takeown ownership commands fail
  • Results in CSS loading failures in site-editor.php

## Impact

  • Site editor displays with broken CSS
  • Block editor styling corrupted
  • Admin panel styles not applied
  • Affects multiple WordPress installations

## Workaround Applied
Modified wp-includes/script-loader.php to reference dist_final folder instead of dist (6 locations changed)

## Additional Technical Details

  • File Creation Date: 2025-07-13 14:31:25-26
  • Permissions: Appear normal but all operations denied
  • Access Pattern: VSCode can read, Windows Explorer cannot access
  • Affected Instances: Multiple WordPress 6.8.1 installations
  • Unaffected: Older WordPress versions with different creation dates

Change History (4)

#1 @kimberlynachbur
4 months ago

Can you describe the edits you were making in step 5? I've been attempting to reproduce the issue, but editing the CSS and block styles at random in the site editor hasn't caused this error for me so far.

Last edited 4 months ago by kimberlynachbur (previous) (diff)

#2 @369work
4 months ago

For some reason, this happens just by opening a block theme design. It doesn't happen with the classic theme. It affects all WordPress folders that contain the problematic directory, and I can't even delete them.
The same problem occurs with xampp.MAMP, but not with DockerDesktop.
I've been researching this for a while, and I think the issue with administrator privileges may be a problem specific to my PC environment.

#3 @369work
4 weeks ago

In my environment, this issue always occurs when creating a new original block theme.
The permissions (ownership) of the contents of the (wp-includes/css/dist) folder change, making them inaccessible.

However, the exact timing is unknown.
It seems to occur unnoticed while duplicating, deleting, or editing a pattern in the theme editor, and I notice it when an error message appears on the site.
file_get_contents(D:\xampp\htdocs\wordpresswp-includes/css/dist/block-library/common.min.css): Failed to open stream: Permission denied

You do not have ownership of "D:\xampp\htdocs\wordpress\wp-includes\css\dist".

[What I can't do]
Overwrite and copy only the wp-includes folder
Delete and re-create the dist folder
Force ownership
Delete the entire parent folder
Delete in safe mode

Only formatting the D disk was successful.

[Reproducible environment]
WordPress version is 6.8
Windows 11 24H2
MAMP
xampp
System is on C disk
xampp and MAMP environment are on D disk
Since xampp and MAMP are not in the system user folder, I suspect this is due to an administrator change.
Apache execution permissions may also be a factor.

[Current situation]
AI recommended that this issue would not occur if I used Local by Flywheel, so I switched to it.

#4 @369work
2 weeks ago

  • Summary changed from Access denied issue with wp-includes/css/dist folder in WordPress 6.8.1 to Access denied issue with wp-includes/css/dist folder in WordPress 6.8.1-6.8.3
  • Version changed from 6.8.1 to 6.8.3

I was using Local by Flywheel AI because I heard there would be no problems, but sure enough, the permissions for wp-includes\css\dist were changed while editing the block theme.
(D:\LocalSites\make\app\public/wp-includes/css/dist/block-editor/default-editor-styles.css): Failed to open stream: Permission denied in D:\LocalSites\make\app\public\wp-includes\block-editor.php on line 204

I can't make any changes, even using PowerShell with administrator privileges.
Cannot access, delete, or view.

Since there's nothing I can do, I'm currently working on creating a dist1 in the CSS and changing it to reference that.
I also added the following to wp-config:
define( 'FS_CHMOD_DIR', 0755 );
define( 'FS_CHMOD_FILE', 0644 );
define( 'DISALLOW_FILE_MODS', false );
define( 'DISALLOW_FILE_EDIT', false );

Why is this happening?

I think it's Windows-related, but I'd like to know the cause.

Note: See TracTickets for help on using tickets.