Hi.
I'll give you a small sample script that will fix permissions for the folder and subfolders in "modules" and all files.
I also have a script here that will fix permissions globally in all folders and subfolders of Prestashop. You need to have max_execution_time set to a higher value.
Just upload the files to FTP and run them in a browser, for example:
https://my-shop.cd/repair-permissions-modules.php
After the repair is complete, you need to delete the files from FTP!!!
.png.022b5452a8f28f552bc9430097a16da2.png)