# cp: cannot open \`/tmp/\_circleci\_local\_build\_repo/./nohup.out' for reading: Permission denied

**URL:** <https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079>\
**Category:** Build Environment\
**Tags:** docker\
**Created:** [August 6, 2018, 2:14pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079 "2018-08-06T14:14:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![cdunn2001](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cdunn2001/32/18776_2.png) [@cdunn2001](https://discuss.circleci.com/u/cdunn2001)\
**Post date:** [August 6, 2018, 2:14pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/1 "2018-08-06T14:14:36Z")

</div>

> <https://github.com/bioconda/bioconda-recipes/issues/10264>

```auto
$ circleci build

====>> Spin up Environment
Build-agent version 0.0.5895-01cdb92 (2018-05-29T20:07:10+0000)
Starting container bioconda/bioconda-utils-build-env
  using image bioconda/bioconda-utils-build-env@sha256:15ee49e7dea59105b90a89660b385b0367eca5a533a2816ab9984d545d6c45dd

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1533496688
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=build
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=https://github.com/bio-nim/bioconda-recipes
  CIRCLE_SHA1=74b4e4fabb57ac401041fc3b0ee2455ef9560a53
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1533496688
  CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
  #!/bin/sh
mkdir -p /root/project && cp -r /tmp/_circleci_local_build_repo/. /root/project
cp: cannot open `/tmp/_circleci_local_build_repo/./nohup.out' for reading: Permission denied

```

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [August 6, 2018, 2:17pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/2 "2018-08-06T14:17:47Z")

</div>

Would you edit some introductory text into this question, to come before the links/code? My experience on Stack Overflow is that posting a link without any context/preamble is not always received well. Volunteers will say “there is no question here”.

---

<div class="post-metadata">

**Author:** ![cdunn2001](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cdunn2001/32/18776_2.png) [@cdunn2001](https://discuss.circleci.com/u/cdunn2001)\
**Post date:** [August 6, 2018, 3:42pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/3 "2018-08-06T15:42:46Z")

</div>

I don’t know how more succinctly to put it. That’s the command I run and the output I see.

I am following this guide:  
[https://bioconda.github.io/contribute-a-recipe.html#test-locally](https://bioconda.github.io/contribute-a-recipe.html#test-locally)

It may be more of a bioconda problem or a docker problem, but I can’t tell. I’m hoping someone else has seen this and knows my mistake.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [August 6, 2018, 3:57pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/4 "2018-08-06T15:57:35Z")

</div>

Much better, thanks. My other ethic when reading/helping with questions is “I’ll expend upon this question the effort that was expended to post it”, and thus if a question is merely a go-fetch from somewhere else, I tend to skip. On the web there’s more questions than willing helpers, so that may be worth bearing in mind 🙂.

---

<div class="post-metadata">

**Author:** ![cdunn2001](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cdunn2001/32/18776_2.png) [@cdunn2001](https://discuss.circleci.com/u/cdunn2001)\
**Post date:** [August 6, 2018, 5:53pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/5 "2018-08-06T17:53:28Z")

</div>

Oh, I’ve made some progress! I had an unreadable file `nohup.out` in my working directory because of earlier attempts to get Docker running on OSX. That was the main problem.

I still have a circleci-specific problem, I think:

```auto
$ time circleci build

====>> Spin up Environment
Build-agent version 0.0.5895-01cdb92 (2018-05-29T20:07:10+0000)
Starting container bioconda/bioconda-utils-build-env
  using image bioconda/bioconda-utils-build-env@sha256:15ee49e7dea59105b90a89660b385b0367eca5a533a2816ab9984d545d6c45dd

Using build environment variables:
  BASH_ENV=/tmp/.bash_env-localbuild-1533576931
  CI=true
  CIRCLECI=true
  CIRCLE_BRANCH=master
  CIRCLE_BUILD_NUM=
  CIRCLE_JOB=build
  CIRCLE_NODE_INDEX=0
  CIRCLE_NODE_TOTAL=1
  CIRCLE_REPOSITORY_URL=https://github.com/bio-nim/bioconda-recipes
  CIRCLE_SHA1=74b4e4fabb57ac401041fc3b0ee2455ef9560a53
  CIRCLE_SHELL_ENV=/tmp/.bash_env-localbuild-1533576931
  CIRCLE_WORKING_DIRECTORY=~/project

====>> Checkout code
  #!/bin/sh
mkdir -p /root/project && cp -r /tmp/_circleci_local_build_repo/. /root/project
====>> Setup ssh
  #!/bin/bash -eo pipefail
mkdir -p ~/.ssh
ssh-keyscan -H github.com >> ~/.ssh/known_hosts

# github.com SSH-2.0-libssh_0.7.0
====>> Setup base system
  #!/bin/bash -eo pipefail
cat >> $BASH_ENV <<EOF
if [[\$- == *u*]] ; then
    set +u ; . /tmp/repo/docker-entrypoint-source ; set -u
else
    . /tmp/repo/docker-entrypoint-source
fi
EOF

====>> Download common definitions
  #!/bin/bash -eo pipefail
curl -s https://raw.githubusercontent.com/bioconda/bioconda-common/master/common.sh > .circleci/common.sh

====>> Setup bioconda-utils
  #!/bin/bash -eo pipefail
.circleci/setup.sh
remote: Counting objects: 120, done.
remote: Total 120 (delta 58), reused 58 (delta 58), pack-reused 62
Receiving objects: 100% (120/120), 157.24 KiB | 2.76 MiB/s, done.
Resolving deltas: 100% (59/59), completed with 24 local objects.
From https://github.com/bioconda/bioconda-recipes
 * [new branch] master -> __upstream__ rsFJF6ejQe/master
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository
====>> Linting
  #!/bin/bash -eo pipefail
bioconda-utils lint recipes config.yml \
--loglevel debug --full-report \
--git-range master HEAD

17:37:25 BIOCONDA INFO Recipes newly unblacklisted:

17:37:25 BIOCONDA INFO No recipe modified according to git, exiting.
====>> Testing
  #!/bin/bash -eo pipefail
bioconda-utils build recipes config.yml \
--git-range master HEAD \
--prelint

17:37:27 BIOCONDA INFO Recipes newly unblacklisted:

17:37:27 BIOCONDA INFO No recipe modified according to git, exiting.
Success!

```

Why does it not see my local changes? The following _does_ see my changes:

```auto
bioconda-utils build recipes config.yml --mulled-test --docker --git-range master

```

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [August 6, 2018, 7:06pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/6 "2018-08-06T19:06:27Z")

</div>

Great update! I’m not familiar with Bioconda or what it does, but I wonder if there is an issue to do with folder confusion. I am wondering if everything is run in a cwd of `/root` but you’ve checked out to `/root/project`? I would suggest doing a (temporary) `run` step of `pwd; ls -l` prior to your failing command, just to check this.

Also, this looks like it needs attention:

> fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository

---

<div class="post-metadata">

**Author:** ![cdunn2001](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cdunn2001/32/18776_2.png) [@cdunn2001](https://discuss.circleci.com/u/cdunn2001)\
**Post date:** [August 6, 2018, 7:13pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/7 "2018-08-06T19:13:48Z")

</div>

- [https://github.com/bioconda/bioconda-recipes/tree/master/.circleci](https://github.com/bioconda/bioconda-recipes/tree/master/.circleci)
- [https://github.com/bioconda/bioconda-utils/tree/master/.circleci](https://github.com/bioconda/bioconda-utils/tree/master/.circleci)

So those are all `bioconda-utils` problems? But I am able to run `bioconda-utls` directly in my local shell. Hmmm… Well, thanks for your suggestions.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [August 6, 2018, 7:16pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/8 "2018-08-06T19:16:12Z")

</div>

I don’t understand your question - my suggestions above could be described either as Linux or Git or CircleCI problems. I am not sure it matters too much though; give them both a try, and let me know how you get on 😺 .

---

<div class="post-metadata">

**Author:** ![cdunn2001](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/cdunn2001/32/18776_2.png) [@cdunn2001](https://discuss.circleci.com/u/cdunn2001)\
**Post date:** [August 6, 2018, 8:32pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/9 "2018-08-06T20:32:42Z")

</div>

Ok. I changed one of the `run` steps to “pwd; ls -larth”:

```auto
====>> Setup bioconda-utils
  #!/bin/bash -eo pipefail
pwd; ls -larth
/root/project
total 384K
-rwxr-xr-x 1 root root 4.2K Aug 6 19:35 bootstrap.py
drwxr-xr-x 9 root root 4.0K Aug 6 19:37 .git
drwxr-xr-x 2 root root 4.0K Aug 6 19:37 .circleci
-rw-r--r-- 1 root root 7.1K Aug 6 19:37 oc3
...

```

It’s clearly a copy of my own working directory, which is a git-clone. So I’ve added `set -vx` to `.circleci/setup.sh`… I guess the problem is that Bioconda folks expect this to be run a different way. Not exactly a bug.

---

<div class="post-metadata">

**Author:** ![renatoaug](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@renatoaug](https://discuss.circleci.com/u/renatoaug)\
**Post date:** [August 30, 2018, 7:28pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/10 "2018-08-30T19:28:47Z")

</div>

_chmod -R 777 ./workingDirectory_ works for me

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [November 28, 2018, 7:37pm UTC](https://discuss.circleci.com/t/cp-cannot-open-tmp-circleci-local-build-repo-nohup-out-for-reading-permission-denied/24079/11 "2018-11-28T19:37:52Z")

</div>

Closed on November 28, 2018, 7:37pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
