Permissions for nextcloud container in VM on F11

Status
Not open for further replies.

LotLits

Dabbler
Joined
Apr 10, 2015
Messages
30
I've been struggling for a while to get nextcloud working correctly in a container running on a ubuntu server VM. I'm trying use Wonderfall's nextcloud container and a mariadb container.

Basically, I have an NFS mounted in the VM to /media/containers/nextcloud. When I `ls` on both, the userids are different:

Freenas
Code:
|--$ ls -lh /mnt/tank/containers/nextcloud/
total 14
drwxrwxrwx  2 docker  docker  2B Jun  8 14:48 apps
drwxrwxrwx  2 docker  docker  3B Jun  8 15:30 config
drwxrwxrwx  3 docker  docker  6B Jun  8 15:30 data
drwxrwxrwx  2 docker  docker  2B Jun  9 16:21 db
drwxrwxrwx  2 docker  docker  2B Jun  8 14:48 themes


Ubuntu Server VM on Freenas
Code:
ls -lh /media/containers/nextcloud/
total 14K
drwxrwxrwx 2 nobody 4294967294 2 Jun  8 14:48 apps
drwxrwxrwx 2 nobody 4294967294 3 Jun  8 15:30 config
drwxrwxrwx 3 nobody 4294967294 6 Jun  8 15:30 data
drwxrwxrwx 2 nobody 4294967294 2 Jun  9 16:21 db
drwxrwxrwx 2 nobody 4294967294 2 Jun  8 14:48 themes


This is the same for other mounts for containers, such as Pi-Hole and Portainer so I guess it's not an issue. But when I try to run the following, I get an error from docker:

docker run -d --name nextcloud_db -v /media/containers/nextcloud/db:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=supersecretpassword -e MYSQL_DATABASE=nextcloud -e MYSQL_USER=nextcloud -e MYSQL_PASSWORD=supersecretpassword mariadb:10

When I run 'docker logs nextcloud_db', I see the following error:
Code:
docker logs nextcloud_db
chown: changing ownership of '/var/lib/mysql/': Invalid argument


I tried all combinations of mapall/maproot/etc but currently have mapall and mapgroup set to the 'docker' user/group (1000).

Has anyone else gotten this working? I feel like I'm missing something obvious or maybe there's a better way to mount directories in the containers.


[EDIT] Just a note, the user id of the docker user/group on the freenas is 1000, as is the local user of the vm:
Freenas
Code:
|--$ grep docker /etc/passwd
docker:*:1000:65534:Docker User:/nonexistent:/usr/local/bin/bash
|--$ grep docker /etc/group
docker:*:1000:


Ubuntu Server VM on Freenas
Code:
$ id
uid=1000(<user>) gid=1000(<user>)
 
Last edited:
D

dlavigne

Guest
I asked the developer and he would like to investigate further as it sounds like a bug. Please create a bug report at bugs.freenas.org and post the issue number here.
 
Status
Not open for further replies.
Top