]>
Commit | Line | Data |
---|---|---|
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 | ||
7 | LCBC=/shared/lcbc | |
8 | LCBC_GRP=p11-lcbc-core | |
9 | ||
10 | BIOINF=/shared/bioinformatics | |
11 | BIOINF_GRP=p11-bioinformatics-core | |
12 | ||
13 | WINPROG=/shared/windows | |
14 | WINPROG_GRP=p01-member-group | |
15 | ||
16 | COMP_PSYC=/shared/comp_psyc | |
17 | COMP_PSYC_GRP=p11-comp-psyc-core | |
18 | ||
19 | AMG=/shared/amg | |
20 | AMG_GRP=p11-amg-core | |
21 | ||
22 | SOFTWARE=/shared/software | |
23 | SOFTWARE_GRP=p01-member-group | |
24 | ||
25 | NCGC=/shared/ncgc | |
26 | NCGC_GRP=p11-ncgc-core | |
27 | ||
28 | DOCKER=/shared/docker | |
29 | DOCKER_GRP=p01-member-group | |
30 | ||
31 | R=/shared/R | |
32 | R_GRP=p01-member-group | |
33 | ||
34 | FOLDERS=($LCBC $BIOINF $WINPROG $COMP_PSYC $AMG $SOFTWARE $NCGC $DOCKER $R) | |
35 | ||
36 | OPTS="-R" | |
37 | PERMS="g+rws,o+rX,o-w" | |
38 | ||
39 | echo Setting group owner $CLUSTER_GRP for $CLUSTER | |
40 | chgrp $OPTS $CLUSTER_GRP $CLUSTER | |
41 | echo Setting group owner $LCBC_GRP for $LCBC | |
42 | chgrp $OPTS $LCBC_GRP $LCBC | |
43 | echo Setting group owner $BIOINF_GRP for $BIOINF | |
44 | chgrp $OPTS $BIOINF_GRP $BIOINF | |
45 | echo Setting group owner $WINPROG_GRP for $WINPROG | |
46 | chgrp $OPTS $WINPROG_GRP $WINPROG | |
47 | echo Setting group owner $COMP_PSYC_GRP for $COMP_PSYC | |
48 | chgrp $OPTS $COMP_PSYC_GRP $COMP_PSYC | |
49 | echo Setting group owner $AMG_GRP for $AMG | |
50 | chgrp $OPTS $AMG_GRP $AMG | |
51 | echo Setting group owner $SOFTWARE_GRP for $SOFTWARE | |
52 | chgrp $OPTS $SOFTWARE_GRP $SOFTWARE | |
53 | echo Setting group owner $NCGC_GRP for $NCGC | |
54 | chgrp $OPTS $NCGC_GRP $NCGC | |
55 | echo Setting group owner $R_GRP for $R | |
56 | chgrp $OPTS $R_GRP $R | |
57 | echo "Setting permissions..." | |
58 | ||
59 | for FOLDER in "${FOLDERS[@]}" | |
60 | do | |
61 | echo Setting perms for $FOLDER | |
62 | chmod $OPTS $PERMS $FOLDER | |
63 | done |