lcdb/lcdb-workflows

permission denied in test folder

Opened this issue · 2 comments

jfear commented

Running the test locally with Docker is giving me a permission denied error when trying to write .snakemake

I have no name!@f2f073222e65:/opt/lcdb/test$ snakemake
Traceback (most recent call last):
  File "/opt/conda/lib/python3.5/site-packages/snakemake/__init__.py", line 399, in snakemake
    no_hooks=no_hooks)
  File "/opt/conda/lib/python3.5/site-packages/snakemake/workflow.py", line 301, in execute
    list_params_changes)
  File "/opt/conda/lib/python3.5/site-packages/snakemake/persistence.py", line 24, in __init__
    os.mkdir(self.path)
PermissionError: [Errno 13] Permission denied: '/opt/lcdb/test/.snakemake'

Maybe an OSX uid/gid thing?

jfear commented

Yep looks like a common issue:
For Example

Found if I just set uid:gid to 1000 it all seems to work.

docker run --rm -it -v $(pwd):/opt/lcdb -u 1000:1000 daler/smklo /bin/bash travis-test.sh

Unless you know a better way??

daler commented

Nope, I only learned of the -u thing recently. I would either accept that I would have to chmod everything, or checkout a repo into /tmp and delete it later.

I think there's a lot of room for simplifying/wrapping/improving how the tests are run locally.