Official Doc has detailed information about install magento in easy steps
- Get the Magento software
- Set file system ownership and permissions
- Installing the Magento software
- Post-installation process
You have taken the clone from magento's repo. Now try make sure that you have set file permissions correctly. File owner should be
Apache / www-data
Try setting the file permissions across the board for installation:
You should set as bellow recommended.
cd <your Magento install dir>
find . -type f -exec chmod 644 {} \; // 644 permission for files
find . -type d -exec chmod 755 {} \; // 755 permission for directory
find ./var -type d -exec chmod 777 {} \; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
chown -R :<web server group> .
chmod u+x bin/magento
Kudo answer if it helps you, Cheers!