Local External storage problems

I have spent many hours searching the internet for information but still can’t find anyone who can help me.
I can’t add local external storage. As I understand it’s because I don’t have permissions to the file I want, but no matter what I do, nothing helps.

I use:
UBUNTU latest version.
Docker and Portainer
I installed Nextcloud using the following instructions: How to Install Nextcloud on Docker using Portainer - YouTube

The path of the files you want to access /hdd
I did:
sudo chown -R www-data:www-data /hdd
sudo chmod -R 0750 /hdd

As far as I watch all the tutorials and videos everywhere, it helps, but not in my case. I don’t understand what’s wrong

Sorry i do not use Docker and Portainer. But i think /hdd is an own partition. It could be that simply changing the user rights on the Nextcloud user is not enough. Maybe you need to include it differently e.g. in /etc/fstab or within Docker and Portainer. Search in this direction.

External memory limits you. Maybe it makes more sense to increase the primary memory if possible.

I would like to point out that

chmod -R 750 /hdd
will drwxr-x— everything in hdd/ that includes all files.

You might not want these files to be executable and for files you [sh]: [c]: ould chmod 640.

sudo find /hdd -type f -print0 | sudo xargs -0 chmod 0640
sudo find /hdd -type d -print0 | sudo xargs -0 chmod 0750