This demonstrates the issue discussed in https://bitbucket.org/snakemake/snakemake/issues/916/integrated-r-scripts-and-directory
To reproduce that and test any fixes, simply clone this github respository and chmod -R a-w
it. Then go to a different directory and snakemake -s path/to/the/snakefile/here
. With an unpatched copy of snakemake you'll get a permissions error. Note that the Snakefile has examples using R and Rmd files, so you'll need to ensure that R is in your PATH.