File tree Expand file tree Collapse file tree 3 files changed +26
-4
lines changed
Expand file tree Collapse file tree 3 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 55 notifempty
66 compress
77 delaycompress
8- create 640 root adm
8+ create 640
99 sharedscripts
1010 postrotate
1111 /etc/init.d/apache2 reload > /dev/null || true
1616 run-parts /etc/logrotate.d/httpd-prerotate; \
1717 fi; \
1818 endscript
19- }
19+ }
Original file line number Diff line number Diff line change 55 notifempty
66 compress
77 delaycompress
8- create 640 nginx adm
8+ create 640
99 sharedscripts
1010 postrotate
1111 [ -f /var/run/nginx.pid ] && kill -USR1 `cat /var/run/nginx.pid`
1212 endscript
13- }
13+ }
Original file line number Diff line number Diff line change @@ -150,3 +150,25 @@ if [ -e "/etc/mysql/my.cnf" ]; then
150150 sed -i ' /symbolic-links\=0/a\local-infile=0' /etc/mysql/my.cnf
151151 fi
152152fi
153+
154+ # Fix logrotate permission bug for nginx
155+ if [-e " /etc/logrotate/nginx" ]; then
156+ sed -i " s/create 640 nginx adm/create 640/g" /etc/logrotate.d/nginx
157+ fi
158+
159+ # Fix logrotate permission bug for apache
160+ if [-e " /etc/logrotate/apache2" ]; then
161+ sed -i " s/create 640 root adm/create 640/g" /etc/logrotate.d/apache2
162+ fi
163+
164+ # Repair messed up user log permissions from the logrotate bug. Ignoring errors
165+ for user in $( $HESTIA /bin/v-list-users plain | cut -f1) ; do
166+ for domain in $( $HESTIA /bin/v-list-web-domains $user plain | cut -f1) ; do
167+ chown root:$user /var/log/$WEB_SYSTEM /domains/$domain .* > /dev/null 2>&1
168+ for sub_domain in $( $HESTIA /bin/v-list-web-domain $user $domain plain | cut -f7 | tr ' ,' ' \n' ) ; do
169+ chown root:$user /var/log/$WEB_SYSTEM /domains/$sub_domain .* > /dev/null 2>&1
170+ done
171+ done
172+ done
173+
174+ chown root:root /var/log/$WEB_SYSTEM /domains/$WEBMAIL_ALIAS * > /dev/null 2>&1
You can’t perform that action at this time.
0 commit comments