We cover checking how the data volume, used with the MySQL container, is setting file permissions. Then we apply that lesson to our application files, so our Docker container can write to the files it needs to.
For this one, I recommend watching the video, as the notes here don't really explain what's happening - we just see the mechanics of what was done.
docker exec -it php_container bash
# See that PHP runs as user www-data
> ps aux | grep php
# Check id of user www-data
> id www-data # will be "33" in Ubuntu containers/servers
> exit
# Back in our host machine
# Chown application directory
# to user id 33 to match the www-data user id
# which PHP runs as inside the container
chown -R 33 application/