# Make a directory writable by Apache on macOS

*2019-03-27*

> Make a directory writable by Apache on macOS by assigning ownership to _www and setting permissions with chown and chmod.

Here's a quick reference for making a directory writable by the Apache web server included with macOS.

1. Set the directory's owner to the `_www` user and its group to `staff`:

   ```sh
   sudo chown -R _www:staff path/to/folder/
   ```

2. Set the permissions so the `_www` user can write to the directory without granting write access to other users:

   ```sh
   sudo chmod -R 755 path/to/folder
   ```

