magento 2 generated folder permissions code example
Example: magento 2 The requested class did not generate properly, because the 'generated' directory permission is read-only
sudo chown -R youruser:www-data /generated
sudo chown -R youruser:www-data /generated