zipurman / oVIRT_Simple_Backup

A REST API backup using PHP for oVirt 4.2.x
GNU General Public License v3.0
56 stars 32 forks source link

Automated Backup tries to access /dev/sr0 and fails #20

Closed Squeakz closed 6 years ago

Squeakz commented 6 years ago

Expected behaviour

auto backup php file will ignore cdrom devices

Actual behaviour

{"status":1,"reason":"Imaging Disk \/mnt\/backups\/FILESRV01\/db499873-c33a-4035-b8f6-7670767c8b7d\/ovirt_20180404_085751\/progress.dat","progress":0,"numberofdisks":2,"thisdisk":""}fdisk: cannot open /dev/sr0: Permission denied

Steps to reproduct the behaviour

su apache php /var/www/html/automatedbackup.php script hangs trying to access /dev/sr0

zipurman commented 6 years ago

Adding the apache/httpd/www-data, which ever user that apache2 runs as to the cdrom group fixes this. Some wise man told me this ... oh yeah, that was you ;)