Nextcloud AIO giving me headaches with SMB shares

So basically I’ve been trying to get Nextcloud AIO to work with my Hetzner storage box which is mounted using cifs with the following line added into fstab:

//<username> /mnt/backup-server cifs rw,mount,credentials=/etc/backup-credentials.txt,uid=1001,gid=1001,file_mode=0660,dir_mode=0770 0 0

I noticed that Nextcloud AIO containers fail to boot, after checking logs it seemed to be an issue about www-data not being able to access the share so the solution was to set the uid to 33 (which is www-data).

However, the problem arises as after this I lose permissions to be able to cd into the mount or edit anything in the mount. Does anyone know what I could do to be able to allow nextcloud to be able to access shares and also allow other services like immich and users like myself to also access the mount at the same time.

I used to use rclone with sshfs mount and nextcloud had a same issue, to fix it I just had to enable vfs file caching. However since I am now mounting using cifs-utils and fstab I don’t have any knowledge on how to fix it. Any help would be appreciated.

This was answered in