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?


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

  • Did you use Composer to install Drupal or did you download a Zip? Consider using Composer. If you downloaded a Zip you do the same for modules. Go to drupal.org, download the Zip, unpack it into the modules/contrib folder, and then enable it from the UI.
    – leymannx
    Commented Aug 30, 2020 at 20:45
  • @leymannx, I installed drupal using the zip package. I'm aware of the manual install of modules, but I'm wondering why the url install method from the GUI doesn't work. Bear with me as I'm just familiarizing myself with drupal Commented Aug 31, 2020 at 2:50
  • @leymannx, thanks for your attempt to help. However I think you missed the gist of my question so let me rephrase it. Drupal 8 allows installing modules from the Extend menu by pasting the module url. See this youtube video. On the video, the update manager does not ask for ftp credentials and just installs the module. Mine prompts for ftp login. What is my local installation missing? I understand there's many ways to install modules but I'm specifically asking about the url method. Commented Sep 2, 2020 at 0:34
  • 1
    On Mac www-data does not exist, if you are running it on localhost you likely want to chown as _www instead.
    – Kevin
    Commented Sep 3, 2020 at 13:51
  • Also want to add that in Drupal 8 the contrib modules are stored in the [project root]/modules directory, though you can put them in [project root]/sites/default/modules or a site specific folder like [project root]/sites/example.dev/modules
    – Ryan Price
    Commented Sep 3, 2020 at 16:19

1 Answer 1


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.

  • Thanks Kevin. That worked. To make it clear, with terminal open in drupal root folder, I entered, sudo chown _www sites/default. Commented Sep 3, 2020 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.