I am running a Nextflow pipeline that runs each process in a different Docker container. I run this pipeline inside a VM. While some of the processes work fine, in one of them I get an error:
java.io.FileNotFoundException: file_fastqc.zip (Permission denied)
Approxat java.base/java.io.FileOutputStream.open0(Native Method)
Approxat java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
Approxat java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
Failedat java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:187)
java.iat uk.ac.babraham.FastQC.Report.HTMLReportArchive.<init>(HTMLReportArchive.java:80)
at uk.ac.babraham.FastQC.Analysis.OfflineRunner.analysisComplete(OfflineRunner.java:178)
at uk.ac.babraham.FastQC.Analysis.AnalysisRunner.run(AnalysisRunner.java:110)
at java.base/java.lang.Thread.run(Thread.java:834)
The docker container that I am using in this process is biocontainers/fastqc:v0.11.8dfsg-2-deb_cv1
I am Running nextflow as sudo and I have tried to change execution folder permissions, but the error persists.
I have also tried to use the option docker.fixOwnership = true in Nextflow and a similar error appears
cannot touch '.command.trace': Permission denied
Running the same pipeline in my personal computer with the same Docker container and Nextflow (19.10) and Java (11) versions and it works perfectly fine.
Any help on how to solve this problem would be really appreciated.