blob: cb3e73f73db1094f917edb086109a91b7e2b33a5 (
plain) (
blame)
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
|
# Here is the place to (recursively) set directory and/or file permissions.
# This is some kind of a stop gap to be sure permissions are set rightly,
# as sometimes eg. archives wield not the desired permissions.
# Also, place for some last ditch copying of files, es this is executed near
# the end of script execution.
set_directory_permissions() (
mkdir -p "$OPENSLXDIR/configs/modules"
chmod 755 "$OPENSLXDIR/configs"
chown -R taskmanager:taskmanager "$OPENSLXDIR/configs"
chmod 755 "$OPENSLXDIR/ipxe"
chown -R taskmanager:taskmanager "$OPENSLXDIR/ipxe"
# Keep care with $OPENSLXDIR, as $OPENSLXDIR/nfs needs other permissions.
chmod 775 "$OPENSLXSRVDIR"
chown -R dmsd:images "$OPENSLXSRVDIR/nfs"
chmod 755 "$WWWDIR"
chown -R root:root "$WWWDIR"
mkdir -p "$WWWDIR/boot/download"
chown -R taskmanager:www-data "$WWWDIR/boot"
chmod 755 "$WWWDIR/boot" "$WWWDIR/boot/download"
chown -R taskmanager "$TFTPDIR"
mkdir -p /home/taskmanager/{certs,.acme.sh}
chown taskmanager:taskmanager /home/taskmanager/{certs,.acme.sh}
chmod 0700 /home/taskmanager/{certs,.acme.sh}
mkdir -p "/srv/openslx/www/.well-known/acme-challenge"
chown taskmanager:taskmanager "/srv/openslx/www/.well-known/acme-challenge"
mkdir -p "$SLXADMINCACHE"
chmod 0755 "$SLXADMINCACHE" # if already there
chown -R www-data:www-data "$SLXADMINCACHE"
)
|