root/trunk/engine/setup/set-gui-permissions.sh

Revision 1403, 3.6 kB (checked in by scitech, 1 week ago)

message_size_limit is set twice

  • Property svn:executable set to *
Line 
1 #!/bin/bash
2
3 # ispCP ω (OMEGA) a Virtual Hosting Control Panel
4 # Copyright (c) 2001-2006 by moleSoftware GmbH
5 # http://www.molesoftware.com
6 # Copyright (c) 2006-2008 by isp Control Panel
7 # http://isp-control.net
8 #
9 #
10 # License:
11 #    This program is free software; you can redistribute it and/or
12 #    modify it under the terms of the MPL Mozilla Public License
13 #    as published by the Free Software Foundation; either version 1.1
14 #    of the License, or (at your option) any later version.
15 #
16 #    This program is distributed in the hope that it will be useful,
17 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
18 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 #    MPL Mozilla Public License for more details.
20 #
21 #    You may have received a copy of the MPL Mozilla Public License
22 #    along with this program.
23 #
24 #    An on-line copy of the MPL Mozilla Public License can be found
25 #    http://www.mozilla.org/MPL/MPL-1.1.html
26 #
27 #
28 # The ispCP ω Home Page is at:
29 #
30 #    http://isp-control.net
31 #
32
33 # read needed entries from ispcp.conf
34 if [ -f /usr/local/etc/ispcp/ispcp.conf ]
35 then
36         for a in `cat /usr/local/etc/ispcp/ispcp.conf | grep -E '(APACHE_|ROOT_|MTA_MAILBOX_|^LOG_DIR|^DEBUG)' | sed -e 's/ //g'`; do
37                 export $a
38         done
39 else
40         for a in `cat /etc/ispcp/ispcp.conf | grep -E '(APACHE_|ROOT_|MTA_MAILBOX_|^LOG_DIR|^DEBUG)' | sed -e 's/ //g'`; do
41                 export $a
42         done
43 fi
44
45 # for spacing
46 echo "";
47 echo "";
48 echo -n "       Setting GUI Permissions: ";
49
50 if [ $DEBUG -eq 1 ]; then
51     echo        "";
52 fi
53
54 #
55 # fixing gui permissions;
56 #
57
58 for i in `find $ROOT_DIR/gui/`; do
59
60         if [ -f $i ]; then
61
62                 if [ $DEBUG -eq 1 ]; then
63                         echo -e "       0444 $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $i";
64                 fi
65
66                 chmod 0444 $i;
67                 chown $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $i;
68
69         elif [ -d $i ]; then
70
71                 if [ $DEBUG -eq 1 ]; then
72                         echo "0555 $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP [$i]";
73                 else
74                         echo -n ".";
75                 fi
76
77                 chmod 0555 $i;
78                 chown $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $i;
79         fi
80
81 done
82
83 #
84 # fixing webmail's database permissions;
85 #
86
87 i="$ROOT_DIR/gui/tools/webmail/data"
88
89 if [ $DEBUG -eq 1 ]; then
90         echo "0755 $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP [$i]";
91 else
92         echo -n ".";
93 fi
94
95 chmod -R 0755 $i;
96 chown -R $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $i;
97
98 #
99 # fixing filemanager permissions
100 #
101
102 i="$ROOT_DIR/gui/tools/filemanager/temp"
103
104 if [ $DEBUG -eq 1 ]; then
105         echo "0777 $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP [$i]";
106 else
107         echo -n ".";
108 fi
109
110 chmod -R 0777 $i;
111
112 #
113 # fixing user_logo folder permissions;
114 #
115
116 i="$ROOT_DIR/gui/themes/user_logos"
117
118 if [ $DEBUG -eq 1 ]; then
119         echo "0755 $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP [$i]";
120 else
121         echo -n ".";
122 fi
123
124 chmod -R 0644 $i;
125 chmod 0755 $i;
126 chown -R $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $i;
127
128
129 #
130 # fixing db keys permissions;
131 #
132
133 chmod 0444 $ROOT_DIR/gui/include/ispcp-db-keys.php
134
135 #
136 # Setting correct permission for virtual root directory
137 #
138
139 chmod  0755 $APACHE_WWW_DIR;
140 chown  $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $APACHE_WWW_DIR;
141
142 #
143 # Set correct permission for phptmp gui directory
144 #
145
146 i="$ROOT_DIR/gui/phptmp"
147
148 if [ $DEBUG -eq 1 ]; then
149         echo "0755 $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP [$i]";
150 else
151         echo -n ".";
152 fi
153
154 chmod -R 0755 $i;
155 chown -R $APACHE_SUEXEC_USER_PREF$APACHE_SUEXEC_MIN_UID:$APACHE_GROUP $i;
156
157 #
158 # Set correct permission for HTMLPurifier/DefinitionCache/Serializer gui directory
159 #
160
161 i="$ROOT_DIR/gui/include/htmlpurifier/HTMLPurifier/DefinitionCache/Serializer"
162 chmod -R 0755 $i;
163
164 echo "done";
Note: See TracBrowser for help on using the browser.