]> git.uio.no Git - python-TSD.git/blame - bin/tsd-shared-setup
Add script currently in production.
[python-TSD.git] / bin / tsd-shared-setup
CommitLineData
58e6f41b
PR
1#!/bin/bash
2#
3# Set up file permissions on /tsd/shared, aka /shared/. This is run
4# from cron daily on a the host with root access to /tsd/shared/, see
5# (/etc/cron.daily/set_permissions).
6
7LCBC=/shared/lcbc
8LCBC_GRP=p11-lcbc-core
9
10BIOINF=/shared/bioinformatics
11BIOINF_GRP=p11-bioinformatics-core
12
13WINPROG=/shared/windows
14WINPROG_GRP=p01-member-group
15
16COMP_PSYC=/shared/comp_psyc
17COMP_PSYC_GRP=p11-comp-psyc-core
18
19AMG=/shared/amg
20AMG_GRP=p11-amg-core
21
22SOFTWARE=/shared/software
23SOFTWARE_GRP=p01-member-group
24
25NCGC=/shared/ncgc
26NCGC_GRP=p11-ncgc-core
27
28DOCKER=/shared/docker
29DOCKER_GRP=p01-member-group
30
31R=/shared/R
32R_GRP=p01-member-group
33
34FOLDERS=($LCBC $BIOINF $WINPROG $COMP_PSYC $AMG $SOFTWARE $NCGC $DOCKER $R)
35
36OPTS="-R"
37PERMS="g+rws,o+rX,o-w"
38
39echo Setting group owner $CLUSTER_GRP for $CLUSTER
40chgrp $OPTS $CLUSTER_GRP $CLUSTER
41echo Setting group owner $LCBC_GRP for $LCBC
42chgrp $OPTS $LCBC_GRP $LCBC
43echo Setting group owner $BIOINF_GRP for $BIOINF
44chgrp $OPTS $BIOINF_GRP $BIOINF
45echo Setting group owner $WINPROG_GRP for $WINPROG
46chgrp $OPTS $WINPROG_GRP $WINPROG
47echo Setting group owner $COMP_PSYC_GRP for $COMP_PSYC
48chgrp $OPTS $COMP_PSYC_GRP $COMP_PSYC
49echo Setting group owner $AMG_GRP for $AMG
50chgrp $OPTS $AMG_GRP $AMG
51echo Setting group owner $SOFTWARE_GRP for $SOFTWARE
52chgrp $OPTS $SOFTWARE_GRP $SOFTWARE
53echo Setting group owner $NCGC_GRP for $NCGC
54chgrp $OPTS $NCGC_GRP $NCGC
55echo Setting group owner $R_GRP for $R
56chgrp $OPTS $R_GRP $R
57echo "Setting permissions..."
58
59for FOLDER in "${FOLDERS[@]}"
60do
61 echo Setting perms for $FOLDER
62 chmod $OPTS $PERMS $FOLDER
63done