When I try to Write a feature module, I'm still getting an error:

Warning: mkdir(): Permission denied in Drupal\Core\File\FileSystem->mkdirCall() (line 240 of core/lib/Drupal/Core/File/FileSystem.php).
Package My Image not written to /modules/custom/my_image. Error: Failed to create directory /modules/custom/my_image.

Even though both my /modules and /modules/custom directories are set to 777 permission and have the correct ownership.

Comments

mpotter created an issue. See original summary.

mpotter’s picture

Priority: Major » Normal

It's possible this is a local issue with my docker setup. Looking into it.

mpotter’s picture

Priority: Normal » Major

Nope, not an issue locally. The issue is that the directory of the package is messed up. It is trying to create /modules/contrib. Notice the /. This is a URL path, but hasn't been converted to a full local FILE PATH for mkdir. Definitely a bug in the WriteGeneration plugin. Will try to fix this tomorrow.

mpotter’s picture

Looks like it was broken by #2494763: Error on generating features when "Include install profile" bundle option checked in the changes to the FeaturesManager::getExportInfo() function. It's using "/modules" instead of "modules".

mpotter’s picture

Status: Active » Fixed

OK, fixed in commit a4f0442.

  • mpotter committed a4f0442 on 8.x-3.x
    Issue #2597706: Cannot write a Features export
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.