I've tried 3 times now to install Magento 2 each time facing issues with permissions.
On initial upload I get 500 server errors because the permissions don't allow access to the files.
I can work around this by setting the following permissions in SSH:
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
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
This gives me enough access to install the site.
After which there's further issues in that the style sheets and JavaScript create the same 500 error from the beginning.
Again playing around with the permissions can fix this, with a little more difficulty.
But even then any new file introduced (product image for example) will have the wrong permissions and cause the 500 error.
--
There must be a way to do this "properly" can anyone help.