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

'pac solution export' results in access denied error even when running vscode as admin #49

Closed
quadmiasmo opened this issue May 26, 2021 · 2 comments
Labels

Comments

@quadmiasmo
Copy link

With the Power Platform VSCode extension installed and successfully connected to a Dataverse environment, I am trying to export a solution by running this command in a VSCode terminal:

pac solution export --path C:\PowerApps\Solutions\SolutionName --name SolutionName -v 1.0.0.0

Which results in this error:

Error: C:\PowerApps\Solutions\SolutionName is an invalid file path. Access to the path 'C:\PowerApps\Solutions\SolutionName' is denied.

I am an admin on the machine and have tried various target directories as well as running VSCode as administrator. All produce the same error.

Extension Version: 1.6.7+g5031575
VSCode Version: 1.56.2

@davidjenni
Copy link
Member

@quadmiasmo the error message is what .NET gets from the Windows filesystem: access denied. This error is not specific to pac CLI nor VSCode.
I tried to repro, but cannot repro:

  • like you, my local user account is part of the local admin group
  • via file explorer, I created a C:\PowerApps\Solutions folder, and did not modify any access rights
  • from within the VSCode (launched as normal, NOT launched as admin/elevated), I ran a similar export, which succeeds w/o issues|:
> pac solution export --name mytestsoln --path C:\PowerApps\Solutions\mytestsoln.zip
Connected to...gintonic
Starting Solution Export...
Solution export succeeded.
  • even tho it shouldn't make any difference for pac CLI, I ran with either pwsh (PS Core) or stock cmd as my shell in the VS Code terminal => success both times
  • here's the permissions of my folder, using the std Windows command icacls:
> icacls C:\PowerApps\Solutions\
C:\PowerApps\Solutions\ BUILTIN\Administrators:(I)(OI)(CI)(F)
                        NT AUTHORITY\SYSTEM:(I)(OI)(CI)(F)
                        BUILTIN\Users:(I)(OI)(CI)(RX)
                        NT AUTHORITY\Authenticated Users:(I)(M)
                        NT AUTHORITY\Authenticated Users:(I)(OI)(CI)(IO)(M)

@quadmiasmo
Copy link
Author

quadmiasmo commented Jun 22, 2021

@davidjenni, thanks for the reply and sorry for the delayed response. Closing this issue as it is no longer reproducing for me either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants