actions / runner-images

GitHub Actions runner images
MIT License
9.79k stars 3k forks source link

Permission Denied error for build shell scripts #10333

Closed aqua-coding closed 1 month ago

aqua-coding commented 1 month ago

Description

I am getting this weird permission denied error which is very inconsistent to the files that it denotes to. Sometimes I get permission denied error for cleanup.sh, sometimes for install-sqlpackage.sh, sometime for install-postgresql.sh and sometimes for other files.

Platforms affected

Runner images affected

Image version and build link

Image version 2.2.4

Is it regression?

No

Expected behavior

the images should be generated without permission denied error

Actual behavior

I am using sudo packer build cmd to execute with retryCountOnTaskFailure: 3 and sometimes in different files are getting the same permission denied error which is breaking the pipeline

the errors: image image image

and this error is weird because in one deployment it will show permission denied for install-erlang.sh and in next pipeline run the script install-erlang.sh will run without any problem but then I will get the same error with install-javatools.sh or some other script.

Repro steps

release ubuntu20/20240708.1.

RaviAkshintala commented 1 month ago

@aqua-coding Thank you for bringing this issue to us. We are looking into this issue and will update you on this issue after investigating.

RaviAkshintala commented 1 month ago

@aqua-coding Could you please try with the latest version 20240721.1

aqua-coding commented 1 month ago

I updated to the latest version 20240721.1 and set the retryCountOnTaskFailure: 3 but still got permission denied error, this time with install-java-tools.sh image

Also, in one of the retry, i got the following error with the script Generate-SoftwareReport.ps1, do you have any fix for this?: image

aqua-coding commented 1 month ago

hello, just asking for an update, were you able to find a fix for the permission denied error?

RaviAkshintala commented 1 month ago

@aqua-coding The permission denied error might be occurring because some of the commands in the script require superuser (root) privileges. You can try modifying the script to use sudo for commands that need permissions. We tried checking the same, we haven't faced any permission errors and kindly check the latest rolled out image.

RaviAkshintala commented 1 month ago

Hi @aqua-coding We have been following up with the issue, as there is no response from you We are closing this issue.Thank you.