Another thing: if you are on an hosting provider, usually, all the operation are performed by the same user which run the PHP instance, so adding file and installing through composer set the right ownership.
But, if you are using a dedicated webserver for you laravel app, you should check the user and group owner of the files.
Depending on you distribution, you should check if the user and group are correct.
Usually apache run over:
- RedHat based distro: apache:apache
- Debian based distro: www-data:www-data
While ngnix run over:
- RedHat based distro: ngnix:ngnix
- Debian based distro: www-data:www-data (not sure about this)