Is it VMFS datastore or NFS? Was the script created in the datastore folder itself or was it imported/copied from somewhere?
I tested both, but I today tested two versions ESXi on my server Fujitsu Primergy TX1310 M3 with this result:
- VMware-VMvisor-Installer-6.7.0-8169922.x86_64.iso = problem with permission on datastore
- VMware-ESXi-6.7.0-9214924-Fujitsu-v451-1.iso = problem with permission on datastore
- VMware-VMvisor-Installer-6.5.0.update02-8294253.x86_64.iso = NO problem with permission on datastore
- VMware-VMvisor-Installer-6.7.0-8169922.x86_64.iso upgraded from 6.5 = problem with persmission on datastore
Second i go to the BIOS and disabled Secure Boot Control in: Security > Secure Boot Configuration
Now i haven't problem with permission on datastore ESXi 6.7 - works normal.