This question has been askewd here. But it was not answered.
I just got a 3rd server and on all 3 servers I use Automysqlbackup script to create MySQL backups. I do it with cronjob:
52 04 * * * /home/backups/backup.sh >/dev/null 2>&1
Dumped and gzipped files of 2 first servers have permissions 644 and I can download them. The new 3rd server creates files with permissions 640 and I can not download them. I have checked the script and it looks that the script does not set/changepermissions of created files. If I login as root and manually create a file in backup folder it has permission 644 as it should be.
All folders/files of Automysqlbackup script have the same permissions on all 3 servers. Backup folders with dumped files have the same permissions on all 3 servers.
My questions.
- Does anyone knows why my 3rd server creates backup files with permission 640 and not 644? How to fix it?
- If there is no fix for it, anyone who using Automysqlbackup script and can me advise what do I need to change in the script to chmod created files 644? Sorry, I know Php but not bash scripts.