By Default GCP VM instances are executing startup script in the /tmp location.
But in my customized ubuntu OS, I have restriction on /tmp location not to execute anything in this location due to security reasons.
Is there anyway to change the default execution path of startup script.
Thanks,
Yes you can!
1.You need to go into your VM's /etc/default/instance_configs.cfg
2.If the file exists, open it and move to [Metadata] section.
3.You may see a “run_dir = ” line which directs the script’s target running folder. You can edit it to set an alternative run directory, for example, /home.
4.Test if the error persists.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With