I have a deployment script written in bash that deploys a jvm based application to the various servers we have. The deployment file is packaged on a windows machine and then using putty's scp command we stage the zip file to the server:Here is the push.ps1 script:Remove-Item C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deploy\run\package.zip -ForceCopy-Item -Path C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deploy\run\* -Exclude @(debug.sh, deploy.sh, main.sh) -Destination C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deploy\package\scriptsCompress-Archive -Path C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deploy\package -DestinationPath C:\All\Scripts\Linux\JDA\deployments\dev-20160808\package.zip -ForceMove-Item -Path C:\All\Scripts\Linux\JDA\deployments\dev-20160808\package.zip -Destination C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deploy\run\package.zip -ForceCompress-Archive -Path C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deploy\run -DestinationPath C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deployment.zip -Force$pscpOutput = pscp -pw shhhhh...secret! C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deployment.zip dev@10.82.67.138:/home/dev/deployment/ | Out-String | Tee-Object -Variable pscpOutput | Out-NullWrite-Verbose $pscpOutputRemove-Item C:\All\Scripts\Linux\JDA\deployments\dev-20160808\deployment.zip -Force# ./deploy.sh -p package.zip  -j /home/dev/x -r forward -d -tWhen this runs I noticed I got a cp error in my terminal:| 20160810 21:08:41 UTC | 20160810 17:08:41 EDT | > Deployment: 375 -> Copying Deployment Package /templates for dev environment files...| 20160810 21:08:41 UTC | 20160810 17:08:41 EDT | > Deployment: 376 -> cp -fr /home/dev/deployment/package/templates/env/dev/. /home/dev/x/jda/optimizer/runtimes/version/16.1.1/templates/env/dev/cp: cannot stat /home/dev/deployment/package/templates/env/dev/.: Permission deniedI ls'd over that directory and got the following output which I have never seen before. Why is the text red and filled with ??? marks? 
Troubleshooting folder permissions in CentOS 7 using Putty
shell script;centos;permissions