After a Magento migration (Liveshop –> Testshop) fell on, that there are problems with the template or. when viewing the page. The content was there, but the CSS was not displayed and the structure was missing = the specially written template for the shop was not loaded.
Now check the files, saw, that the directory /pub/static/frontend/NAME/Theme/de_DE was almost empty. Only one requirejs-config.js was ever flying around in the directory.
We had set the shop to developer mode, where many of the template files are symlinked to the app/design directory. If you have now given the deploy command via SSH
php bin/magento setup:static-content:deploy -f
the data was stored and the page was displayed correctly. A short time later, however, all directories and files were lost again and only the above-mentioned. requirejs file was still there.
The idea regarding. wrong write permissions (CHMOD) stood in the room, did not bring anything. In the end, that was the mistake, that the .htaccess file from the /pub/static folder was lost. You can, for example,. from the Magento repository 2 on github (HERE) get it and put it back in the directory.
Then there are no more problems with the template.