Ftp upload with lftp remove chmod command

I am using the following CI/CD script to upload changes from my gitlab repository to an FTP web server. My issue is that after the files are uploaded the runner is trying to issue a chmod command which is failing this command doesn’t need to be run is there a way to prevent it from happening?

qa:
stage: qa
script:
- apt-get update -qq && apt-get install -y -qq lftp
- lftp -c “set ftp:ssl-allow no; open -u $qaUSERNAME,$PASSWORD $HOST; mirror -Rev ./ ./site/wwwroot --ignore-time --parallel=10 --exclude-glob README.md --exclude-glob .git* --exclude .git/ --exclude botInfo.php”
when: manual
only:
- master

This is lftp problem, not GitLab.

https://linux.die.net/man/1/lftp says use option:

-p, --no-perms
don’t set file permissions

So use lftp -p -c “set ftp:ssl-allow no; open -u $qaUSERNAME,$PASSWORD $HOST; mirror -Rev ./ ./site/wwwroot --ignore-time --parallel=10 --exclude-glob README.md --exclude-glob .git* --exclude .git/ --exclude botInfo.php”

FYI using the format you provided resulted in an Unknown command -p. error. the correct format was

lftp -c "set ftp:ssl-allow no; open -u $prodUSERNAME,$PASSWORD $HOST; mirror -Rev ./ ./site/wwwroot  --ignore-time --parallel=10 --exclude-glob README.md --exclude-glob .git* --exclude .git/ --exclude botInfo.php  --no-perms"