We try to deploy a package via a SSH target, and we receive following errors:
Deploying package: /home/lnxbuild/.octopus/OctopusServer/Files/pdansible@S36@DD3ABA5AB975114086A6CA6216F57486.tar.gz
Failed to extract the package because access to the package was denied. This may have happened because anti-virus software is scanning the file. Try disabling your anti-virus software in order to rule this out.
System.UnauthorizedAccessException: Access to the path ‘/home/lnxbuild/.octopus/Applications/OctopusServer/Platform-Staging/pdansible/36_1/PaxHeaders.13197’ is denied. —> System.IO.IOException: Permission denied
We do not run anti-virus on Linux hosts. The SSH host uses ‘lnxbuild’ as the connection user, and the host health check is good.
Is there anything that might cause this error?
Any help will be appreciated!
Hi, Thanks for getting in touch! I’m sorry to hear you are seeing issues accessing a package content during a deployment.
Upon looking at the error, it apperas your linux target is having issues accessing a file or folder named
PaxHeaders.13197 which could point towards issues with the package itself. Are you able to deploy different packages to this linux SSH target successfully?
One troubleshooting step we could try is to login directly to the SSH target as the
lnxbuild user and check if you can expand the tar.gz file locally. I’m also interested in if this same package can be extracted successfully on a different server.
Thanks for the response!
We were able to log into the host as lnxbuild user and expand the package locally on the host.
Is there anything else we can try?
We switched the package to use .zip instead of .tar.gz, and it appears to be working now.
Ideally, we want to use .tar.gz format.
Any idea why .zip works but .tar.gz doesn’t?
Hi, Thanks for keeping in touch! Thanks for letting us know that switching to .zip worked in this case. I did a bit of reading about why the
PaxHeaders folder appears and the general idea I get is that there are slight differences in how some applications compress and expand
Would it be possible to attempt to re-compress as
.tar.gz package with a different program? I’m interested to know if using a different program makes it deploy successfully on your targets.
We created tar.gz package from TeamCity build step. Here is the command we use:
#tar czf pdansible.%build.number%.tar.gz -C $PWD/release/ . --exclude infra/python_modules --transform ‘s,^,pdansible/,’ --owner=2300 --group=200
Does this ring a bell?
Hi, Thanks for keeping in touch! I’m sorry for the long delay in getting back to you on this one! unfortunately, I was unable to find out the root cause of why we are seeing these PaxHeaders when creating tar.gz packages.
I believe it will have something to do with the version of software used to compress and expand the packages. One option which comes to mind to test could be to first compress your package, then proceed to expand it out on the same TeamCity Server.
I look forward to hearing from you.