For me, the problem was that the files directory in the data directory of the user was missing. I previously deleted it assuming Nextcloud would automatically recreate missing directories. So I did it manually.
3 Likes