Chown error when launching owncloud in docker

I have a weird thing that I am trying to solve. I have docker running on an Ubuntu 24.04 host.

When it boots it mounts an exfat drive

/dev/sdb1 /data exfat defaults,uid=1000,gid=1000,umask=0022 0 0

In the container it mounts this drive for the data

volumes:
    - /data/owncloud:/mnt/data

When the container starts I get this error:

Fixing base perms... chown: changing ownership of '/var/www/owncloud/custom': Operation not permitted chown: changing ownership of '/var/www/owncloud/config': Operation not permitted

If I mount the volume straight to the host it, owncloud runs successfully so I know it’s an exfat drive mount issue.

Also when you look into the “/mnt/data” file structure the “/var/www/” files are not even in there so I am not sure why the container is effected by that mount.

I know formatting my drive to ext4 would solve this but I am mounting some other folders from that drive to a Windows 10 machine.

I have tried different combinations of uid=1,gid=1,umask=1000 and it just seemed to make things worse. I have about 6 other containers reading and writing to the same /data mount as owncloud is.

Hey,

could it be possible that this is related to the ongoing discussion here: