Bug #703

Backup Does not work after upgrade from 2.1 to 3.0

Added by Greg Williams almost 4 years ago. Updated almost 4 years ago.

Status:Closed Start date:06/03/2013
Priority:Immediate Due date:
Assignee:- % Done:

100%

Category:- Spent time: -
Target version:-

Description

Get the following error during backup after upgrading from 2.1 to 3.0

[root@go astguiclient]# perl ./ADMIN_backup.pl --debugx

----- DEBUG -----

----- SUPER DEBUG -----

mkdir: cannot create directory `/var/log/astguiclient/archive/temp': File exists
/usr/bin/mysqldump --user=cron --password=1234 --lock-tables --flush-logs asterisk | /usr/bin/gzip > /var/log/astguiclient/archive/temp/192.168.43.202asterisk1.gz
mysqldump: Couldn't execute 'show create table `go_viewLists`': SHOW VIEW command denied to user 'cron'@'localhost' for table 'go_viewLists' (1142)
/bin/tar cf /var/log/astguiclient/archive/temp/192.168.43.202_CONF_1.tar /etc/astguiclient.conf /etc/zaptel.conf /etc/dahdi /etc/asterisk
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/192.168.43.202_LINUX_1.tar /etc/my.cnf /etc/crontab_snapshot /etc/hosts /etc/rc.d/rc.local /etc/resolv.conf
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/192.168.43.202_WEB_1.tar /var/www/html
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/192.168.43.202_BIN_1.tar /var/lib/asterisk/agi-bin /usr/share/astguiclient
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/192.168.43.202_SOUNDS_1.tar /var/lib/asterisk/sounds
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/temp/192.168.43.202_VOICEMAIL_1.tar /var/spool/asterisk/voicemail
/bin/tar: Removing leading `/' from member names
/bin/tar cf /var/log/astguiclient/archive/192.168.43.202_ALL_1.tar /var/log/astguiclient/archive/temp
/bin/tar: Removing leading `/' from member names
rm -f /var/log/astguiclient/archive/192.168.43.202_ALL_1.tar.gz
/usr/bin/gzip -9 /var/log/astguiclient/archive/192.168.43.202_ALL_1.tar
rm -fR /var/log/astguiclient/archive/temp
DONE, Exiting...
You have new mail in /var/spool/mail/root

User Cron does not have enough privileges to view table, resolved by increasing user level but obviously creates a security issue.

History

Updated by Erwin De Luna almost 4 years ago

Hi Greg,

You must use your root mysql credentials to make those scripts functional.

Regards,
GoAutoDial Team

Updated by Greg Williams almost 4 years ago

Erwin De Luna wrote:

Hi Greg,

You must use your root mysql credentials to make those scripts functional.

Regards, GoAutoDial Team

Agreed, however this script defaults to the cron user. This should be changed

Updated by Demian Biscocho almost 4 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

Thank you for pointing this out. Looks like CRON doesn't have enough permissions on the additional tables created. This can be fixed by giving user CRON show view privileges.

#mysql -pvicidialnow asterisk;
mysql> GRANT SHOW VIEW ON `asterisk` . * TO 'cron'@'localhost' IDENTIFIED BY '1234';
mysql> GRANT SHOW VIEW ON `asterisk` . * TO 'cron'@'%' IDENTIFIED BY '1234';

Let us know how it goes.

Updated by Greg Williams almost 4 years ago

Demian Biscocho wrote:

Thank you for pointing this out. Looks like CRON doesn't have enough permissions on the additional tables created. This can be fixed by giving user CRON show view privileges.

[...]

Let us know how it goes.

Works fine. Thank you

Updated by Demian Biscocho almost 4 years ago

  • Status changed from Feedback to Closed

Updates has been posted in our repo. To update system run:

#yum update

Also available in: Atom PDF