biopython_docker icon indicating copy to clipboard operation
biopython_docker copied to clipboard

Updating notebooks using Git pull changes owner to root

Open vincentdavis opened this issue 9 years ago • 3 comments

If you use git pull to update the notebooks the changed files get the owner and group root:root. This makes the notebook unable to be saved. I tried correcting this locally(docker) by using the $chown --preserve[=ATTR_LIST] but that did not seem to work for some reason.

vincentdavis avatar Dec 16 '15 01:12 vincentdavis

I think the solution is to use switch users with $su jupyternotebook.

vincentdavis avatar Dec 16 '15 17:12 vincentdavis

I just updated the docker images at docker hub, so this problem is now mitigated. I will leave this open as this is something to be sorted out.

tiagoantao avatar Dec 16 '15 22:12 tiagoantao

Looking at this issue again, It is possible to do the git pull from a notebook. The notebook runs as the correct user "jupyteruser". If the parent biopython-notebook is owned by "jupyteruser" then from within a notebook you can execute, for example;

%%bash
git pull

What do you think of making this change?

vincentdavis avatar Jan 15 '16 00:01 vincentdavis