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

Error on Set-Acl during install/upgrade #163

Closed
dhilgarth opened this issue Mar 11, 2015 · 6 comments
Closed

Error on Set-Acl during install/upgrade #163

dhilgarth opened this issue Mar 11, 2015 · 6 comments

Comments

@dhilgarth
Copy link

InvalidOperation in Set-Acl when upgrading to 0.9.9.2

When trying to upgrade from 0.9.9-rc8 to 0.9.9.2 I am getting the following error:

Set-Acl : The security identifier is not allowed to be the owner of this object

Complete output:

 Chocolatey v0.9.9.2
 Chocolatey is unpacking required files for use. Overwriting? True
 Adding Modify permission for current user to 'D:\Data\Apps\_Chocolatey'
 Set-Acl : The security identifier is not allowed to be the owner of this object.
 At D:\Data\Apps\_Chocolatey\lib\chocolatey\tools\chocolateysetup.psm1:189 char:5
 +     Set-Acl $folder $acl
 We are setting up the Chocolatey package repository.
 +     ~~~~~~~~~~~~~~~~~~~~
 The packages themselves go to 'D:\Data\Apps\_Chocolatey\lib'
     + CategoryInfo          : InvalidOperation: (D:\Data\Apps\_Chocolatey:String) [Set-Acl], InvalidOperationException
   (i.e. D:\Data\Apps\_Chocolatey\lib\yourPackageName).
     + FullyQualifiedErrorId : System.InvalidOperationException,Microsoft.PowerShell.Commands.SetAclCommand
 A shim file for the command line goes to 'D:\Data\Apps\_Chocolatey\bin'
   and points to an executable in 'D:\Data\Apps\_Chocolatey\lib\yourPackageName'.
 Creating Chocolatey folders if they do not already exist.
 WARNING: You can safely ignore errors related to missing log files when
   upgrading from a version of Chocolatey less than 0.9.9.
   'Batch file could not be found' is also safe to ignore.
   'The system cannot find the file specified' - also safe.
 Chocolatey v0.9.9.2
 This is try 1/3. Retrying after 300 milliseconds.
  Error converted to warning:
  Access to the path 'D:\Data\Apps\_Chocolatey\choco.exe.old' is denied.
 This is try 2/3. Retrying after 400 milliseconds.
  Error converted to warning:
  Access to the path 'D:\Data\Apps\_Chocolatey\choco.exe.old' is denied.
 Maximum tries of 3 reached. Throwing error.
 Attempting to delete choco.exe.old ran into an issue:
  Access to the path 'D:\Data\Apps\_Chocolatey\choco.exe.old' is denied.
 Chocolatey is unpacking required files for use. Overwriting? True
 Chocolatey (choco.exe) is now ready.
 You can call choco from anywhere, command line or powershell by typing choco.
 Run choco /? for a list of functions.
 You may need to shut down and restart powershell and/or consoles
  first prior to using choco.
chocolatey upgrade not successful.
Error while running 'D:\Data\Apps\_Chocolatey\lib\chocolatey\tools\chocolateyInstall.ps1'.
 See log for details.
@ghost
Copy link

ghost commented Mar 11, 2015

Same problem here... trying to update from version 0.9.9.1

@ferventcoder ferventcoder added this to the 0.9.9.3 milestone Mar 13, 2015
ferventcoder added a commit to ferventcoder/choco that referenced this issue Mar 24, 2015
ferventcoder added a commit to ferventcoder/choco that referenced this issue Mar 24, 2015
* stable:
  (chocolateyGH-163) Ignore Acl Errors during install
  (chocolateyGH-168) Install .NET Framework 4.0 immediately
@ferventcoder ferventcoder self-assigned this Mar 29, 2015
@ferventcoder
Copy link
Member

I've switched over to catching this error so hopefully it is fixed.

@ferventcoder
Copy link
Member

Definitely let me know when you install 0.9.9.3 if it comes up (you may see the text) and flags chocolatey as a failed install (which it should no longer do).

@ferventcoder ferventcoder changed the title InvalidOperation in Set-Acl when upgrading to 0.9.9.2 Error on Set-Acl during install/upgrade Mar 29, 2015
@dhilgarth
Copy link
Author

Looks good.

Here is my output:

PS C:\Windows\system32> choco upgrade chocolatey
Chocolatey v0.9.9.2
Upgrading the following packages:
chocolatey
By upgrading you accept licenses for the packages.
You have chocolatey v0.9.8.33 installed. Version 0.9.9.4 is available based on your source(s)

chocolatey v0.9.9.4
 Found 'chocolateyInstall.ps1':

$toolsPath = (Split-Path -parent $MyInvocation.MyCommand.Definition)

# ensure module loading preference is on
$PSModuleAutoLoadingPreference = "All";

$modules = Get-ChildItem $toolsPath -Filter *.psm1
$modules | ForEach-Object {{{{
                                                                                                        $psm1File = $_.F
ullName;
                                                                                                        $moduleName = $(
[System.IO.Path]::GetFileNameWithoutExtension($psm1File))
                                                                                                        remove-module $m
oduleName -ErrorAction SilentlyContinue;
                                                                                                        import-module -n
ame  $psm1File;
                                                                                                    }}}}

Initialize-Chocolatey



Do you want to run the script?
 NOTE: If you choose not to run the script, the installation will
 fail.
 Skip is an advanced option and most likely will never be wanted.

 1) yes
 2) no [Default - Press Enter]
 3) skip
1
 Chocolatey v0.9.9.4
 Chocolatey is unpacking required files for use. Overwriting? True
 WARNING: The names of some imported commands from the module 'chocolateyInstaller' include unapproved verbs that might

 make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the
 Verbose parameter. For a list of approved verbs, type Get-Verb.
 Adding Modify permission for current user to 'D:\Data\Apps\_Chocolatey'
 WARNING: Not able to set permissions for user.
 We are setting up the Chocolatey package repository.
 The packages themselves go to 'D:\Data\Apps\_Chocolatey\lib'
   (i.e. D:\Data\Apps\_Chocolatey\lib\yourPackageName).
 A shim file for the command line goes to 'D:\Data\Apps\_Chocolatey\bin'
   and points to an executable in 'D:\Data\Apps\_Chocolatey\lib\yourPackageName'.
 Creating Chocolatey folders if they do not already exist.
 WARNING: You can safely ignore errors related to missing log files when
   upgrading from a version of Chocolatey less than 0.9.9.
   'Batch file could not be found' is also safe to ignore.
   'The system cannot find the file specified' - also safe.
 Chocolatey v0.9.9.4
 This is try 1/3. Retrying after 300 milliseconds.
  Error converted to warning:
  Access to the path 'D:\Data\Apps\_Chocolatey\choco.exe.old' is denied.
 This is try 2/3. Retrying after 400 milliseconds.
  Error converted to warning:
  Access to the path 'D:\Data\Apps\_Chocolatey\choco.exe.old' is denied.
 Maximum tries of 3 reached. Throwing error.
 Attempting to delete choco.exe.old ran into an issue:
  Access to the path 'D:\Data\Apps\_Chocolatey\choco.exe.old' is denied.
 Chocolatey is unpacking required files for use. Overwriting? True
 WARNING: The names of some imported commands from the module 'chocolateyInstaller' include unapproved verbs that might

 make them less discoverable. To find the commands with unapproved verbs, run the Import-Module command again with the
 Verbose parameter. For a list of approved verbs, type Get-Verb.
 Chocolatey (choco.exe) is now ready.
 You can call choco from anywhere, command line or powershell by typing choco.
 Run choco /? for a list of functions.
 You may need to shut down and restart powershell and/or consoles
  first prior to using choco.
 chocolatey has been upgradeed successfully.

Chocolatey upgraded 1/1 package(s). 0 package(s) failed.
 See the log for details.
PS C:\Windows\system32>

BTW: Notice the discrepancy in the version numbers. After starting the command, Chocolatey reports as v0.9.9.2. However, then Chocolatey tells me that I have "chocolatey v0.9.8.33" installed...

@ferventcoder
Copy link
Member

It's looking in the packages folder for that.

@ferventcoder
Copy link
Member

Good to know it is not blocking now.

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

3 participants