Although doing this is unsupported, you'll need to back that file up to ESXi to store. It does this automatically every hour (or used to), but manually you'll have to run /sbin/auto-backup.sh.
Thanks for the recommendation, and how can I change the permissions of the files.
I would try this - in case I needed to do something similar.
Edit local.sh but do NOT modify permissions.
# local configuration options
# Note: modify at your own risk! If you do/use anything in this
# script that is not part of a stable API (relying on files to be in
# specific places, specific tools, specific output, etc) there is a
# possibility you will end up with a broken system after patching or
# upgrading. Changes are not supported unless under direction of
# VMware support.
Create new file /vmfs/volumes/datastore/scripts/custom-boot.sh
echo "now launching custom-boot.sh" >> /vmfs/volumes/datastore/scripts/custom-boot.log
chmod 755 /etc/file
chmod 755 /etc/another-file
Not nice - but works around all the problems you are facing now.