Skip to content
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.

Fix permissions on ~/.cache #22

Merged
merged 2 commits into from
Nov 23, 2020
Merged

Conversation

manics
Copy link
Collaborator

@manics manics commented Aug 16, 2020

apt-get install xorg somehow results in a /home/jovyan/.cache directory being created and owned by root, maybe because HOME is set to /home/jovyan? This prevents the jovyan user running other programs such as Firefox:

$ podman build -t jupyter-desktop-server .
...

$ podman run --rm jupyter-desktop-server ls -la
total 40
drwxrwxr-x. 7 jovyan users 4096 Aug 16 17:04 .
drwxr-xr-x. 3 root   root  4096 Aug 16 17:04 ..
-rw-rw-r--. 1 jovyan users  220 Feb 25 12:03 .bash_logout
-rw-rw-r--. 1 jovyan users 3770 Jun 18 03:05 .bashrc
drwx------. 2 root   root  4096 Aug 16 17:02 .cache
drwxrwxr-x. 2 jovyan users 4096 Aug 16 17:04 .conda
drwsrws---. 3 jovyan users 4096 Jun 18 03:10 .config
drwsrws---. 2 jovyan users 4096 Jun 18 03:10 .jupyter
-rw-rw-r--. 1 jovyan users  807 Feb 25 12:03 .profile
drwsrwsr-x. 2 jovyan users 4096 Jun 18 03:05 work

Note fix-permissions $HOME only makes it group writeable, it doesn't fix the owner which is why I'm using chown instead.

drwxrwxr-x. 7 jovyan users 4096 Aug 16 17:08 .
drwxr-xr-x. 3 root   root  4096 Aug 16 17:08 ..
-rw-rw-r--. 1 jovyan users  220 Feb 25 12:03 .bash_logout
-rw-rw-r--. 1 jovyan users 3770 Jun 18 03:05 .bashrc
drwxrwx---. 3 root   users 4096 Aug 16 17:08 .cache
drwxrwxr-x. 2 jovyan users 4096 Aug 16 17:08 .conda
drwsrws---. 3 jovyan users 4096 Jun 18 03:10 .config
drwsrws---. 2 jovyan users 4096 Jun 18 03:10 .jupyter
-rw-rw-r--. 1 jovyan users  807 Feb 25 12:03 .profile
drwsrwsr-x. 2 jovyan users 4096 Jun 18 03:05 work

manics added 2 commits August 16, 2020 18:15
`apt-get install xorg` somehow results in a `/home/jovyan/.cache` directory being created and owned by `root`, maybe because `HOME` is set to `/home/jovyan`? This prevents the `jovyan` user running other programs such as Firefox:

```
$ podman build -t jupyter-desktop-server .
...

$ podman run --rm jupyter-desktop-server ls -la
total 40
drwxrwxr-x. 7 jovyan users 4096 Aug 16 17:04 .
drwxr-xr-x. 3 root   root  4096 Aug 16 17:04 ..
-rw-rw-r--. 1 jovyan users  220 Feb 25 12:03 .bash_logout
-rw-rw-r--. 1 jovyan users 3770 Jun 18 03:05 .bashrc
drwx------. 2 root   root  4096 Aug 16 17:02 .cache
drwxrwxr-x. 2 jovyan users 4096 Aug 16 17:04 .conda
drwsrws---. 3 jovyan users 4096 Jun 18 03:10 .config
drwsrws---. 2 jovyan users 4096 Jun 18 03:10 .jupyter
-rw-rw-r--. 1 jovyan users  807 Feb 25 12:03 .profile
drwsrwsr-x. 2 jovyan users 4096 Jun 18 03:05 work

```

Note `fix-permissions $HOME` only makes it group writeable, it doesn't fix the owner which is why I'm using `chown` instead.
```
drwxrwxr-x. 7 jovyan users 4096 Aug 16 17:08 .
drwxr-xr-x. 3 root   root  4096 Aug 16 17:08 ..
-rw-rw-r--. 1 jovyan users  220 Feb 25 12:03 .bash_logout
-rw-rw-r--. 1 jovyan users 3770 Jun 18 03:05 .bashrc
drwxrwx---. 3 root   users 4096 Aug 16 17:08 .cache
drwxrwxr-x. 2 jovyan users 4096 Aug 16 17:08 .conda
drwsrws---. 3 jovyan users 4096 Jun 18 03:10 .config
drwsrws---. 2 jovyan users 4096 Jun 18 03:10 .jupyter
-rw-rw-r--. 1 jovyan users  807 Feb 25 12:03 .profile
drwsrwsr-x. 2 jovyan users 4096 Jun 18 03:05 work
```
@manics
Copy link
Collaborator Author

manics commented Aug 16, 2020

I found another permissions problem on mybinder with /opt/install. I can't reproduce it with podman so maybe it's specific to Docker? The second commit should fix it.

Test here: https://mybinder.org/v2/gh/manics/jupyter-omeroanalysis-desktop/fix-perms?urlpath=desktop

@nthiery
Copy link

nthiery commented Nov 21, 2020

I confirm that the jupyter-omeroanalysis-desktop binder link still works. Which was
helpful for me for testing purposes while I am trying to install jupyter-desktop-server
on our local hub (as an aside: if this installation works, it will be a lifesaver next week
for our remote teaching!)

Could this PR be merged / resolved?

@yuvipanda yuvipanda merged commit 83ab1a6 into yuvipanda:master Nov 23, 2020
@yuvipanda
Copy link
Owner

Thanks for the PR, @manics. And thanks for the nudge, @nthiery!

I've now added @manics to this repository as well, since this is really a generalization of his work :)

@manics manics deleted the fix-perms branch November 24, 2020 16:59
yuvipanda added a commit that referenced this pull request Jan 17, 2023
maint: add dependabot for github actions
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants