We get error like this checkInstallationFilePermissions when we do static-content-deploy.

How to debug:

setup/src/Magento/Setup/Model/FilePermissions.php

Goto line 143 in method checkRecursiveDirectories

Add the lines var_dump($subDirectory); var_dump($subDirectory->isWritable());

Re run sudo php bin/magento setup:upgrade

Now you'll see what is really wrong, and you can fix it