Issue
After Nextflow 25.04 was released, many users reported getting .command.run: Permission denied errors
immediately after launching recent pipeline versions of nf-core pipelines.
This is an obscure error that emerged due to an unfortunately invalid configuration syntax in the nf-core pipeline template, that no longer works due to a stricter configuration parsing in the most recent Nextflow versions.
Resolution
If you’re seeing this above error you have a few options. In order of difficulty:
-
Use an older version of Nextflow (24.10.6 or earlier)
-
Use a Nextflow config file that overwrites the invalid config syntax locally. Save this in a config file
// Set bash options process.shell = [ "bash", "-C", // No clobber - prevent output redirection from overwriting files. "-e", // Exit if a tool returns a non-zero status/exit code "-u", // Treat unset variables and parameters as an error "-o", // Returns the status of the last command to exit.. "pipefail" // ..with a non-zero status or zero if all successfully execute ]
and use with
-c
, eg.nextflow run nf-core/rnaseq -c nf_config_fix.config
. -
Use an older version of the pipeline that has nf-core/tools template < 3.0.0, thus was published before 2024-10-08. The issue was fixed and published in the template 3.1.2 on 2025-01-27, so pipeline versions released after that day are mostly not affected either, unless they were published with an older template. You can fine the template version that a pipeline uses in a hidden file called
.nf-core.yml
in the pipeline repository. Additionally, some pipelines already incorporate a manual fix, so even though released during that period, pixelator v1.4.0 and references 0.1 already incorporate the required change.
References
- Correction in nf-core pipeline template
Pull-request that fixed the underlying issue in the nf-core pipeline template
- Announcement regarding the issue on nf-core Slack
Detailed report by Phil Ewels regarding the matter and suggestions for resolution