How to configure virtual Nextcloud server using physical NFS mount NAS data storage?

Would it be possible to assign Nextcloud (which is VM server) data directory to NFS mount NAS physical storage?

I keep on getting can’t create or write onto data directory… on the configuration page even with the right directory permission and ownership.

Thanks in advance.

Additional info:

  • Nextcloud 12.0.4
  • Web server using nginx
  • NAS Synology
  • Tried both NFS mount in and outside www basedirectory

SOLVED. Changed selinux policy mode from enforcing to permissive.