Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


nobody:nogroup permission issue with test pipeline on bitbucket

Hey guys,

I am quite new to the docker world, any help or pointers to resolve this would be appreciated. Its been few days I am trying to find a workaround with no luck yet.

I had a docker pipeline already setup which is used for testing the code after each git push and then if its successful, the deploy pipeline begins and runs. The pipelines are currently failing at testing after bitbucket disabled the --network=host and I am not sure what should be a solution in my case.

I am getting this error:

docker run --name=myapache_container -p 443:443 -p 80:80 -d -v "`pwd`:/var/www/mycodepackage" --add-host=lti-api.mydomain.test: --add-host=mysql: --add-host=mailhog: --network=host $DOCKER_HUB_USERNAME/mycodepackage:latest
docker: Error response from daemon: cannot share the host's network namespace when user namespaces are enabled.


So to counter this, if i remove --network=host parameter in my docker run command it fails with permission issues in the conatiner when i do chown in next steps in pipeline which wasn't the case happening before:

docker exec myapache_container chown -Rv www-data:www-data /var/www/mycodepackage/storage failed to change ownership of '/var/www/mycodepackage/storage/logs/.gitignore' from nobody:nogroup to www-data:www-data

Looking forward to your responses.

Thank you.

1 answer

1 accepted

2 votes
Answer accepted

Solution provided by Atlassian Support Ninja:

Based on our observation, the issue that you're facing is due to how usersns feature work in docker.
If I understand what you're trying to achieve, you're trying to modify the ownership of the directory to "www-data:www-data".

The reason why you're having an issue changing the ownership as the volume which mounted to the container is still owned by the root directory.
Since the container is mapped to a non-root user, it's expected that you're having the error while trying to modify the directory's ownership.

What we can suggest is to run "chown -R 165536:165536 $BITBUCKET_CLONE_DIR" to map the directory with the docker accessible's userid.
This should allow you to make any changes to the volume which are mounted to your container.

Please run the command before the "docker run" command

Hope this helps.

I ran into a similar permissions issue with `chown` in a docker-in-docker pipeline.

This fix worked perfectly!

`chown -R 165536:165536 $BITBUCKET_CLONE_DIR`

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events