This is not a ownership issue, it is a group permissions issue ?
The purpose of the second number (775) is to indicate that the group of the files / directory may execute, write and read.
Yes, changing the ownership will work if you change it to the webserver user (more explicitly, the php user).
Some additional information #890
Unfortunately, as it stands the current instructions for installing flarum are incomplete.
It needs to provide one additional instruction, to change the group from the current user to the php user
This will typically resolve the issue (assuming install is at /var/www/html)
chgrp www-data /var/www/html
chgrp -R www-data /var/www/html/assets /var/www/html/storage