Closed chistopher closed 9 months ago
I will try to investigate, but I'm guessing we need two things:
setfacl
on the project dir to give the domjudge
user access.Or maybe instead we should add a parameter UID
(and GID
) to specify under which user to run? I've seen that more often in the world of Docker and then you can use the user that the files belong to. Thoughts?
If it helps, here are the permissions before I do the chmod
.
chris@i11pcweyand:~/test$ ll domjudge/
total 856
drwxr-xr-x 15 chris algo 4096 Feb 10 17:06 ./
drwxr-xr-x 3 chris algo 4096 Feb 10 17:05 ../
-rwxr-xr-x 1 chris algo 241 Feb 10 17:06 bootstrap*
-rw-r--r-- 1 chris algo 66735 Feb 10 17:06 ChangeLog
-rw-r--r-- 1 chris algo 241 Feb 10 17:06 codecov.yml
-rw-r--r-- 1 chris algo 153 Feb 10 17:06 CODINGSTYLE.md
-rw-r--r-- 1 chris algo 4161 Feb 10 17:06 composer.json
-rw-r--r-- 1 chris algo 483327 Feb 10 17:06 composer.lock
-rwxr-xr-x 1 chris algo 44826 Feb 10 17:06 config.guess*
-rwxr-xr-x 1 chris algo 35543 Feb 10 17:06 config.sub*
-rw-r--r-- 1 chris algo 13916 Feb 10 17:06 configure.ac
-rw-r--r-- 1 chris algo 3449 Feb 10 17:06 CONTRIBUTING.md
-rw-r--r-- 1 chris algo 18001 Feb 10 17:06 COPYING
-rw-r--r-- 1 chris algo 1499 Feb 10 17:06 COPYING.BSD
-rw-r--r-- 1 chris algo 1023 Feb 10 17:06 COPYING.MIT
drwxr-xr-x 5 chris algo 4096 Feb 10 17:06 doc/
-rw-r--r-- 1 chris algo 581 Feb 10 17:06 docker-compose.yml
-rw-r--r-- 1 chris algo 357 Feb 10 17:06 .editorconfig
drwxr-xr-x 2 chris algo 4096 Feb 10 17:06 etc/
drwxr-xr-x 5 chris algo 4096 Feb 10 17:06 example_problems/
drwxr-xr-x 8 chris algo 4096 Feb 10 17:06 .git/
-rw-r--r-- 1 chris algo 46 Feb 10 17:06 .gitattributes
drwxr-xr-x 6 chris algo 4096 Feb 10 17:06 .github/
-rw-r--r-- 1 chris algo 199 Feb 10 17:06 .gitignore
drwxr-xr-x 3 chris algo 4096 Feb 10 17:06 gitlab/
-rw-r--r-- 1 chris algo 290 Feb 10 17:06 .gitlab-ci.yml
-rwxr-xr-x 1 chris algo 14431 Feb 10 17:06 install-sh*
drwxr-xr-x 3 chris algo 4096 Feb 10 17:06 judge/
-rw-r--r-- 1 chris algo 1119 Feb 10 17:06 .lgtm.yml
drwxr-xr-x 2 chris algo 4096 Feb 10 17:06 lib/
drwxr-xr-x 2 chris algo 4096 Feb 10 17:06 m4/
-rw-r--r-- 1 chris algo 13488 Feb 10 17:06 Makefile
-rw-r--r-- 1 chris algo 2965 Feb 10 17:06 Makefile.global
drwxr-xr-x 2 chris algo 4096 Feb 10 17:06 misc-tools/
-rw-r--r-- 1 chris algo 5573 Feb 10 17:06 paths.mk.in
-rw-r--r-- 1 chris algo 986 Feb 10 17:06 .phpmd-ruleset.xml
-rw-r--r-- 1 chris algo 4141 Feb 10 17:06 README.md
-rw-r--r-- 1 chris algo 311 Feb 10 17:06 .sastscanrc
-rw-r--r-- 1 chris algo 1012 Feb 10 17:06 SECURITY.md
drwxr-xr-x 3 chris algo 4096 Feb 10 17:06 sql/
drwxr-xr-x 2 chris algo 4096 Feb 10 17:06 submit/
-rw-r--r-- 1 chris algo 19350 Feb 10 17:06 symfony.lock
drwxr-xr-x 10 chris algo 4096 Feb 10 17:06 webapp/
As you can see, a user that is not part of the algo group has no write access which is probably the problem.
i get an error when starting the contributor container after a clean checkout of domjudge source Steps as descibed here:
git clone git@github.com:DOMjudge/domjudge.git
docker run -it --name dj-mariadb -e MYSQL_ROOT_PASSWORD=rootpw -e MYSQL_USER=domjudge -e MYSQL_PASSWORD=djpw -e MYSQL_DATABASE=domjudge -p 13306:3306 mariadb --max-connections=1000
docker run -v [path-to-domjudge-checkout]:/domjudge -v /sys/fs/cgroup:/sys/fs/cgroup:ro --link dj-mariadb:mariadb -it -e MYSQL_HOST=mariadb -e MYSQL_USER=domjudge -e MYSQL_DATABASE=domjudge -e MYSQL_PASSWORD=djpw -e MYSQL_ROOT_PASSWORD=rootpw -p 12345:80 --name domjudge --privileged domjudge/domjudge-contributor
The last command fails with the following error:
After some digging I found that it fails here because the domjudge user does not have enough permissions.
I tired
chmod -R a+rwx domjudge
docker rm domjudge
docker run
from above againNow it runs for a bit longer but fails later with