-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathset_permissions.sh
More file actions
executable file
·40 lines (34 loc) · 936 Bytes
/
set_permissions.sh
File metadata and controls
executable file
·40 lines (34 loc) · 936 Bytes
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
34
35
36
37
38
39
40
#!/bin/sh
# All files and folders
chmod -R 755 config
chmod -R 755 db
chmod -R 755 lib
chmod -R 755 resources
chmod -R 755 static
chmod -R 755 tests
chmod -R 755 views
find config -type f -exec chmod 644 {} \;
find db -type f -exec chmod 644 {} \;
find lib -type f -exec chmod 644 {} \;
find resources -type f -exec chmod 644 {} \;
find static -type f -exec chmod 644 {} \;
find tests -type f -exec chmod 644 {} \;
find views -type f -exec chmod 644 {} \;
# Config files in root
chmod 755 .htaccess
# Executable scripts
chmod 700 *.sh
# Folders with executables
chmod -R 700 bin
chmod 755 bin
chmod -Rf 700 vendor/bin
chmod 755 vendor/bin
chmod -Rf 700 vendor/squizlabs/php_codesniffer/bin
chmod 755 vendor/squizlabs/php_codesniffer/bin
chmod -Rf 700 vendor/robmorgan/phinx/bin
chmod 755 vendor/robmorgan/phinx/bin
chmod 700 vendor/phpunit/phpunit/phpunit
# Just top level folder
chmod 755 vendor
# Private folders
chmod 700 docs