Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run command with required permissions #5213

Closed
2 of 7 tasks
onuzbee opened this issue Mar 10, 2022 · 1 comment
Closed
2 of 7 tasks

Unable to run command with required permissions #5213

onuzbee opened this issue Mar 10, 2022 · 1 comment

Comments

@onuzbee
Copy link

onuzbee commented Mar 10, 2022

Description

Workflows have started to fail, requiring to run as administrator privileges. Failed workflow link

We have just started to see this issue, and wasn't persistent before. Did something change with the windows-latest upgrate to v2022? Docs still mention the following:

Windows virtual machines are configured to run as administrators with User Account Control (UAC) disabled.

Could someone help us navigate through this? Or if we'd need to provide runAs flag somewhere in case there have been some permission changes?

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

https://github.com/twilio/scoop-twilio-cli/runs/5491214973?check_suite_focus=true

Is it regression?

No response

Expected behavior

No response

Actual behavior

No response

Repro steps

Rerun the workflow given above.

@al-cheb
Copy link
Contributor

al-cheb commented Mar 11, 2022

Hello @onuzbee,
All powershell scripts are run by default with disabled UAC under runner user which is a member of Administrator group, that's why we get Running the installer as administrator is disabled by default, use -RunAsAdmin parameter if you know what you are doing. error.

To fix an issue you should pass RunAsAdmin flag to the script:

- run: |
          (New-Object System.Net.WebClient).DownloadFile('https://get.scoop.sh', 'scoop.ps1') 
          ./scoop.ps1 -RunAsAdmin

image

cola314 added a commit to cola314/SimpleMarkdown that referenced this issue Jun 13, 2022
fix: scoop 다운로드 시 권한 부족으로 실패하는 문제 수정

actions/runner-images#5213
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants