-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmaintenance
More file actions
executable file
·39 lines (35 loc) · 888 Bytes
/
Copy pathmaintenance
File metadata and controls
executable file
·39 lines (35 loc) · 888 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
#!/bin/bash
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
if [ -f REM_this_is_jail ];
then
chmod -R u+r .
chmod -R go-wx+r .
chmod o-r * .*
chmod o+r static
chmod go+x .
chmod a+rx bin
chmod a+rx bin/python3*
chmod -R go+x lib64
chmod -R go+x lib
chmod -R go+x dev
chmod -R go+x include
chmod -R go+rx static
# the next one might not exist
chmod --silent -R go+x usr
# change these to your user name
sudo chown -R cscircles *
sudo chgrp -R cscircles *
mkdir -p scratch
sudo rm -rf scratch/*
# this allows the webserver to create scratch subdirectories
sudo chgrp www-data scratch
chmod g+rwx scratch
chmod o-rwx scratch
chmod o+x scratch # Added Sep'26 for Python 3.11 migration
else
echo "This script must be run in jail" 1>&2
exit 1
fi