Xtrabackup 2.4 always says "file not found" when given --defaults-file

I’m brand new to Xtrabackup, but my work needs transactional backups for production MySQL, so here we are.

I’m trying to get a test database to back up. I have a simple shell script that puts some paths in variables, then tries to run the command. The username, password, and port (we’re not using 3306) are all in a separate file. Every time I run the backup, I’m told the defaults file is not found.
I’m running all this as the backup user. Thus:
nano /etc/mysql/backup_creds.cnf[client]user=usernamepassword=passwordport=####<br>chown mysqlbackup:mysqlbackup /etc/mysql/backup_creds.cnfchmod 600 /etc/mysql/backup_creds.cnf #I've tried 700 and 777 as well<br>sudo -u mysqlbackup /etc/mysql/xtrabackup_test.sh/etc/mysql/xtrabackup_test.sh: 6: /etc/mysql/xtrabackup_test.sh: --defaults-file=/etc/mysql/backup_creds.cnf: not found&nbsp;&nbsp;&nbsp; <br>
I should also say that this server is running 5.7 and 8.0. I’ve therefore installed xtrabackup 2.4 from source, and will soon do the same for 8.0. The shell script defines the path to the executable rather than using the normal “xtrabackup” command. Oh, and I’ve checked the permissions: execute is allowed for user, group, and other from / all the way to backup_creds.cnf, so the user should be able to get to the file. That said, I get an identical error even with the .cnf file set to 777.
I’m completely stuck, and have no idea what to try next. It seems like a permissions problem, but I can’t figure out where the bad permission is set. I don’t even know for sure that I’m on the right track. Let me know what other details I should add, if any. Thanks for any suggestions.

Never mind, figured it out. It was a syntax error in the shell script not severe enough to cause an error in Bash, but enough to cause problems when the script was executed. I’ve got it now.