I'm trying to get the Nextcloud AIO up and running in an Ubuntu 22.04 container. I need to make the datadir live on a SMB/CIFS share. I've got the share mounted on the host but I'm having trouble with permissions in the container. Nextcloud AIO docker image uses www-data/33 as the user. I'm trying to map a uid I've created to the www-data user on the container but I can't get it to work. I can get the mapping to work when chosing a uid that doesn't already exist in the container.
You might wonder why I don't just change the user in the docker image but Nextcloud AIO doesn't allow that. It has to use the www-data/33 user and they've already said they won't be adding functionality for this.
One of the things I did try was to set the gid for the mount to 110000, then create a group in the container called lxc_shares, then add www-data to that group. It allows me to read and write from in the container as www-data to the mount but inside the docker container it does not allow www-data access to the mount. Maybe someone knows a flag or setting I'm overlooking to make that happen.
Edit: So, I'm kind of an idiot. LOL I ended up just setting the uid and gid in the /etc/fstab line that mounted the drive to "100000" and "100033". That seems to have worked.
You might wonder why I don't just change the user in the docker image but Nextcloud AIO doesn't allow that. It has to use the www-data/33 user and they've already said they won't be adding functionality for this.
One of the things I did try was to set the gid for the mount to 110000, then create a group in the container called lxc_shares, then add www-data to that group. It allows me to read and write from in the container as www-data to the mount but inside the docker container it does not allow www-data access to the mount. Maybe someone knows a flag or setting I'm overlooking to make that happen.
Edit: So, I'm kind of an idiot. LOL I ended up just setting the uid and gid in the /etc/fstab line that mounted the drive to "100000" and "100033". That seems to have worked.
Last edited: