##### SUMMARY
When installing a collection, all files are created with mode 0600. This is caused by the way the collection .tar.gz file is extracted: https://github.com/ansible/ansible/blob/d3ec31f8d5683926aa6a05bb573d9929a6266fac/lib/ansible/galaxy/collection.py#L1076-L1090 The file created by `tempfile.NamedTemporaryFile()` seems to have mode `0600` and is simply moved to the final destination without a following `os.chmod`.

(See also this discussion: https://github.com/ansible-collections/community.general/pull/29#discussion_r396147440)

##### ISSUE TYPE
- Bug Report

##### COMPONENT NAME
lib/ansible/galaxy/collection.py

##### ANSIBLE VERSION
```
2.9
2.10
```

collection_tar = collection_artifact[1]
    output_path = os.path.join(os.path.split(collection_tar)[0], b'output')
    collection_path = os.path.join(output_path, b'ansible_namespace', b'collection')
    mock_display = MagicMock()
    monkeypatch.setattr(Display, 'display', mock_display)
    mock_download = MagicMock()
    mock_download.return_value = collection_tar
    monkeypatch.setattr(collection, '_download_file', mock_download)
    monkeypatch.setattr(galaxy_server, '_available_api_versions', {'v2': 'v2/'})
    temp_path = os.path.join(os.path.split(collection_tar)[0], b'temp')
    os.makedirs(temp_path)
    meta = api.CollectionVersionMetadata('ansible_namespace', 'collection', '0.1.0', 'https://downloadme.com',
                                         'myhash', {})
    req = collection.CollectionRequirement('ansible_namespace', 'collection', None, galaxy_server,
                                           ['0.1.0'], '*', False, metadata=meta)
    req.install(to_text(output_path), temp_path)
    # Ensure the temp directory is empty, nothing is left behind
    assert os.listdir(temp_path) == []
    actual_files = os.listdir(collection_path)
    actual_files.sort()
    assert actual_files == [b'FILES.json', b'MANIFEST.json', b'README.md', b'docs', b'playbooks', b'plugins', b'roles']
    assert mock_display.call_count == 1
    assert mock_display.mock_calls[0][1][0] == "Installing 'ansible_namespace.collection:0.1.0' to '%s'" \
        % to_text(collection_path)
    assert mock_download.call_count == 1
    assert mock_download.mock_calls[0][1][0] == 'https://downloadme.com'
    assert mock_download.mock_calls[0][1][1] == temp_path
    assert mock_download.mock_calls[0][1][2] == 'myhash'
    assert mock_download.mock_calls[0][1][3] is True
def test_install_collections_from_tar(collection_artifact, monkeypatch):