every time static content generated i have to set permission var generated in maento 2 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