x11docker: Minor problem with permissions and cygwin ~/.cache folder on windows

Hi, first of all congrats for the project. I really like it. I had started a complete desktop with x11docker in Ubuntu without problems. In Windows I’m using xwin in cygwing installed.

When I use x11docker for the first time, it works correctly, problems start when I try to run x11docker after that first try. Some files created at '~/.cache' (C:\cygwin64\home\<username>\.cache\ in Windows) are created with some weird permissions. The output of x11docker is this:

x11docker note: Using X server option --xwin

x11docker note: Windows firewall settings can forbid application access
  to the X server. If no application window appears, but no obvious error
  is shown, please check your firewall settings. Compare issue #108 on github.

sed: can't read /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
/home/<username>/.cache/x11docker/x11docker-xfce-69725547864/xtermrc: line 23: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
/usr/bin/x11docker: line 1062: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
/usr/bin/x11docker: line 1062: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied

x11docker ERROR: waitforlogentry(): container.CMD: Timeout waiting for log entry "containerrootrc=ready" in store.info.
  Last lines of logfile store.info:

  Type 'x11docker --help' for usage information
  Debug options: '--verbose' (full log) or '--debug' (log excerpt).
  Logfile will be: /home/<username>/.cache/x11docker/x11docker.log
  Please report issues at https://github.com/mviereck/x11docker

grep: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
sed: can't read /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
/usr/bin/x11docker: line 850: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
grep: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
grep: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
grep: /home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info: Permission denied
rm: cannot remove '/home/<username>/.cache/x11docker/x11docker-xfce-69725547864/share/store.info': Permission denied

I’ve tried to delete these files as admin, and the unique way I’ve been able to delete them was starting windows in safe mode and delete it with the file explorer. After removing these files, the first time you start x11docker again it works fine.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (9 by maintainers)

Commits related to this issue

Most upvoted comments

Good to see that --debug now runs overall. I’ve fixed some unrelated issues seen in the output.

The second log shows wrong file ownership of store.info:

-rw-r----- 1 Unknown+User Unknown+Group 736 Sep 22 20:17 /home/Darwin/.cache/x11docker/x11docker-xfce-76162803841/share/store.info

In the first log it is ok. I have no idea why the first startup works fine, but the second one does not. There should be no relation at all between the two starts. The cache folder names are different as intended, x11docker-xfce-75941500095 versus x11docker-xfce-76162803841.

I suspect one line in storeinfo() that might cause trouble: https://github.com/mviereck/x11docker/blob/master/x11docker#L882 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" should drop old entries. It fails expectedly in one case in the container due to file access issues, but that should cause no harm. It should just fail without doing anything. But maybe it confuses docker-for-win or Cygwin.

x11docker does not need this sed line, it is only included for general purposes. I have disabled it now. Maybe that makes a difference.