#!/bin/bash
chmod 755 do*
sudo chown -R tech.tech models/
sudo chown -R tech.tech views/
sudo chown -R tech.tech controllers/
sudo chown -R tech.tech modules/

chmod 644 ../console/controllers/*.*
chmod 755 models/
chmod 644 models/*.*
chmod 755 views/
chmod 644 assets/*.*
chmod 644 widgets/*.*
chmod 755 widgets/views/
chmod 644 widgets/views/*.*
cd views
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
cd ..
chmod 755 controllers/
cd controllers
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
cd ..
chmod 755 modules/
cd modules
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
cd ..
cd themes
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
cd ..
cd web/themes
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
cd ..
cd ..
cd web/images
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
sudo chmod 777 logo/
sudo chmod 777 banners/
cd ..
cd ..
sudo chown -R tech.tech ../common/models/
chmod 755 ../common/models/
chmod 644 ../common/models/*.*
chmod 755 components/
cd components
sudo find . -type d -exec chmod 755 {} \;
sudo find . -type f -exec chmod 644 {} \;
cd ..
cd web
sudo chmod 777 upload/
sudo chmod 777 assets/
cd upload
sudo find . -type d -exec chmod 777 {} \;
cd ..
cd ..
sudo chmod 777 runtime/
cd ..
cd api
sudo chmod 777 runtime/

