New Installation with NAS as a datasource

I am wondering if anyone can point me in the right direction. I have installed nextcloud with standard defaults, in particular using the local apache www root folder as the data-store. I am now performing another installation using the Sysnology NAS as the data-store. To setup for this an NFS share on the NAS was setup and mounted via \etc\fstab

/etc/fstab

10.100.99.99:/volume1/UserData /mnt/UserData nfs rsize=8192,wsize=8192,timeo=14,intr

From the client, I am able to write to the NFS mount as the www-data user with the following command.

su -s /bin/bash www-data

After the installation completes I get the following error:

“Internal Server Error

The server encountered an internal error and was unable to complete your request.

Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.

More details can be found in the server log”

I am assuming this is a linux permission error since the nextcloud-data folder exist on the NAS and apache cannot set permissions.

All resources I have found points to the installation of nextcloud on the NAS itself and does not related to this scenario. Any assistance is greatly appreciated, thank you advance.

Even though you are mounting external storage, make sure you have it mounted outside the web root.

You should manually create the data folder and set the permissions to be the same as what your web folders use.

It is already outside of web root, NFs Share has been mounted to /mnt/Userdata/nextcloud-data

Already performed as well. however, i am not allow to set permissions

chown www-data:www-data /mnt/UserData/nextcloud-data results with the error

chown: changing ownership of ‘/mnt/UserData/nextcloud-data’: Operation not permitted

If the permissions aren’t suitable, it may not work. I don’t have a lot of experience with NFS, but you wouldn’t have this sort of problem with iSCSI. Maybe something to consider as an alternative.

Mount it like this:

10.100.99.99:/volume1/UserData /media/cloudData cifs credentials=/root/cloudDataCredentials,uid=33,gid=33,iocharset=utf8,file_mode=0660,dir_mode=0770,noperm

It basically simulates the correct Permissions, works like a charm in my installation.
Make sure to store login credentials in a file only root can read eg. ‘/root/cloudDataCredentials’