starshot-prototype icon indicating copy to clipboard operation
starshot-prototype copied to clipboard

DDEV: Make sites/default folder writable, to allow deleting starshot folder after ddev delete

Open gitressa opened this issue 1 year ago • 0 comments

Problem

I need to chmod 755 web/sites/default before being allowed to delete the Starshot project folder. This does not happen in standard DDEV/Drupal installations, because web/sites/default folder has drwxr-xr-x permissions, not dr-xr-xr-x.

Starshot

~/dev/starshot$ l web/sites/
dr-xr-xr-x 3 user user 4,0K 25 maj 11:39 default

Standard Drupal 10

$ l web/sites/
drwxr-xr-x 3 user user 4,0K 24 maj 09:48 default

Reproduce

Try to clean up and delete the Starshot folder after ddev delete, but get an error:

$  rm starshot/ -rf
rm: cannot remove 'starshot/web/sites/default/default.settings.php': Permission denied
rm: cannot remove 'starshot/web/sites/default/default.services.yml': Permission denied
rm: cannot remove 'starshot/web/sites/default/settings.php': Permission denied
rm: cannot remove 'starshot/web/sites/default/files': Permission denied

Solution

Perhaps we can add write permission to that folder as a final step of the ddev composer drupal:install, something like cd web && chmod 755 sites/default?

Discussed in #94.

gitressa avatar May 25 '24 11:05 gitressa