Question

I have Drupal 8 running on localhost on macOS Catalina. When I try to install a module, I get prompted to enter ftp credentials (which I don't know). See the following screenshot.

enter image description here

I've seen solutions that suggest this ftp prompt is caused by a permission issue in sites/default folder and can be fixed with chown www-data sites/default or chown apache sites/default for linux but those commands on a mac throw 'chown: www-data: illegal user name' or 'chown: apache: illegal user name' error. What do I need to do to enable installing modules/themes without being prompted for ftp?

EDIT

I'm specifically asking about installing modules by the url method from the admin interface.

Était-ce utile?

La solution

Depending on how you are running this locally (native, Docker, etc) this can differ, but I will assume you are using what comes with macOS to run Drupal.

The difference here is Mac does not have a www-data or apache user like Linux does. If you are running with the defaults, the user you are looking for is _www (unless you have modified this in Apache confs).

So, you will want to do:

chown _www (directory)

Technically, this is probably better asked on ServerFault, but I can imagine there are a lot of people trialling or demoing Drupal who just use what is on Mac to do it, and will come across this post finding it helpful.

Licencié sous: CC-BY-SA avec attribution
Non affilié à drupal.stackexchange
scroll top