-
Notifications
You must be signed in to change notification settings - Fork 3
/
util_chmod.sh
executable file
·33 lines (26 loc) · 1.06 KB
/
util_chmod.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
sudo usermod -a -G www-data ubuntu
sudo chgrp -R www-data *
sudo chown -R ubuntu *.py *.md *.txt src media config .gitignore
sudo chown -R www-data backup data cache
find src -type f | sudo xargs chmod 640
find src -type d | sudo xargs chmod 750
find media -type f | sudo xargs chmod 640
find media -type d | sudo xargs chmod 750
find cache -type f | sudo xargs chmod 660
find cache -type d | sudo xargs chmod 770
find backup -type f | sudo xargs chmod 660
find backup -type d | sudo xargs chmod 770
find data -type f | sudo xargs chmod 660
find data -type d | sudo xargs chmod 770
find config -type f | sudo xargs chmod 640
find config -type d | sudo xargs chmod 750
sudo chown www-data config/cron.conf config/bot.conf
sudo chown -R ubuntu:ubuntu *.sh .git
sudo chmod -R 700 *.sh
sudo chmod 640 robots.txt *.py*
sudo chown ubuntu:ubuntu *.md requirements.txt
sudo chmod 600 *.md requirements.txt .gitignore
find .git -type f | sudo xargs chmod 640
find .git -type d | sudo xargs chmod 750
sudo chown ubuntu:www-data ../yuicompressor.jar
sudo chmod 640 ../yuicompressor.jar