You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a RHEL-9 GCP compute VM, the google_metadata_script_runner places the startup script in a /tmp/metadata-script${suffix}/ folder and adds the execution bit to the file. By default, one cannot execute a script from /tmp when SELinux is enforcing.
The permission denied error can be reproduced by trying to execute a script in /tmp while SELinux is enforcing.
Possible solutions:
do not use TmpDir when SELinux is enforcing
explicitly set the SELinux context for the startup script
use a location that SELinux blesses (eg Red Hat uses /usr/local/sbin/custom-firet-boot for their first boot script)