that was the problem. I used the settings in this answer https://help.nextcloud.com/t/you-dont-have-permissions-to-upload-or-create-files-here-local-external-ntfs-3g-storage/5420 and solved my problem after rebooting the server and changing the permissions again and recreating the local storage folder.