How to fix the «failed to open stream: Permission denied» failure on the «setup:upgrade» command?

This failure ios because your store has wrong filesystem permissions? e.g.:

How to set the proper filesystem permissions?