Hi, so Iām using an arm device xu4 and docker and Iād like to use the nextcloudpi docker image but when it is booting it gets stuck on permissions relating to writing the database.
The mounted folder has owner root read/write/execute and others to read and execute. And Iāve set the following as the faq state.
What user/permissions should I have to the external USB drive mount point, the ncdata and ncdatabase directory?
Directory | User | Group | Permissions | Permission mask |
---|---|---|---|---|
Mount Point | root | root | drwxr-xāx | 751 |
ncdata | www-data | www-data | drwxr-xā | 750 |
ncdatabase | mysql | mysql | drwxr-xr-x | 755 |
The docker command is-
docker run -d --restart=always -p 4443:4443 -p 443:443 -p 80:80 -v /pooled/docker/application_data/nextcloudplus:/data --name nextcloudplus ownyourbits/nextcloudpi-armhf $DOMAIN
And the log errors from my container:
Starting Apache
Starting mariaDB
2018-12-13 10:42:50 3069956096 [Note] mysqld (mysqld 10.1.37-MariaDB-0+deb9u1) starting as process 90 ā¦
2018-12-13 10:42:50 3069956096 [ERROR] mysqld: Canāt create/write to file ā/data/database/aria_log_controlā (Errcode: 13 āPermission deniedā)
2018-12-13 10:42:50 3069956096 [ERROR] mysqld: Got error āCanāt create fileā when trying to use aria control file ā/data/database/aria_log_controlā
2018-12-13 10:42:50 3069956096 [ERROR] Plugin āAriaā init function returned error.
2018-12-13 10:42:50 3069956096 [ERROR] Plugin āAriaā registration as a STORAGE ENGINE failed.
2018-12-13 10:42:50 3069956096 [Note] InnoDB: innodb_empty_free_list_algorithm has been changed to legacy because of small buffer pool size. In order to use backoff, increase buffer pool at least up to 20MB.
2018-12-13 10:42:50 3069956096 [Note] InnoDB: Using mutexes to ref count buffer pool pages
2018-12-13 10:42:50 3069956096 [Note] InnoDB: The InnoDB memory heap is disabled
2018-12-13 10:42:50 3069956096 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2018-12-13 10:42:50 3069956096 [Note] InnoDB: GCC builtin __atomic_thread_fence() is used for memory barrier
2018-12-13 10:42:50 3069956096 [Note] InnoDB: Compressed tables use zlib 1.2.8
2018-12-13 10:42:50 3069956096 [Note] InnoDB: Using Linux native AIO
2018-12-13 10:42:50 3069956096 [Note] InnoDB: Using generic crc32 instructions
2018-12-13 10:42:50 3069956096 [ERROR] mysqld: Canāt create/write to file ā/tmp/ib0MgKXmā (Errcode: 13 āPermission deniedā)
2018-12-13 10:42:50 b6fbd000 InnoDB: Error: unable to create temporary file; errno: 13
2018-12-13 10:42:50 3069956096 [ERROR] Plugin āInnoDBā init function returned error.
2018-12-13 10:42:50 3069956096 [ERROR] Plugin āInnoDBā registration as a STORAGE ENGINE failed.
2018-12-13 10:42:50 3069956096 [Note] Plugin āFEEDBACKā is disabled.
2018-12-13 10:42:50 3069956096 [ERROR] Could not open mysql.plugin table. Some plugins may be not loaded
2018-12-13 10:42:50 3069956096 [ERROR] Unknown/unsupported storage engine: InnoDB
2018-12-13 10:42:50 3069956096 [ERROR] Aborting
So where do I set the proper permissions to resolve this?
Update. Inside the container the user mysql is doing this work on this volume.
mysql:x:101:102:MySQL Server,:/nonexistent:/bin/false
but on my host it maps to:
systemd-network:x:101:102:systemd Network Management,:/run/systemd/netif:/usr/sbin/nologin
So the question is what do people normally do with this type of container internal work mapping when attaching volumes? And something I did the change permissions on the folder caused these issues even though I changed the volume permissions to be more laxed.
total 110632
drwxrwxrwx 5 systemd-network systemd-network 4096 Dec 13 12:45 .
drwxr-xr-x 7 root root 4096 Dec 13 12:42 ā¦
-rwxrwxrwx 1 systemd-network systemd-network 16384 Nov 29 18:24 aria_log.00000001
-rwxrwxrwx 1 systemd-network systemd-network 52 Nov 29 18:24 aria_log_control
-rwxrwxrwx 1 root root 0 Nov 29 17:58 debian-10.1.flag
-rwxrwxrwx 1 systemd-network systemd-network 12582912 Nov 29 18:24 ibdata1
-rwxrwxrwx 1 systemd-network systemd-network 50331648 Nov 29 18:24 ib_logfile0
-rwxrwxrwx 1 systemd-network systemd-network 50331648 Nov 29 18:24 ib_logfile1
-rwxrwxrwx 1 systemd-network systemd-network 0 Nov 29 17:59 multi-master.info
drwxrwxrwx 2 systemd-network root 4096 Nov 29 17:58 mysql
drwxrwxrwx 2 systemd-network systemd-network 4096 Nov 29 18:24 nextcloud
drwxrwxrwx 2 systemd-network systemd-network 4096 Nov 29 17:58 performance_schema
Thank you.