Consider this your reminder that wp-cli needs to run as an user with permission when it modifies the file system.