-
Notifications
You must be signed in to change notification settings - Fork 903
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
Chocolatey CLI is unable to save HTTP Cache files when running as a non-admin user and the cachelocation
is set to point at the Chocolatey ProgramData folder
#3264
Labels
5 - Released
Bug
Requires NuGet.Client Change
This issue requires a modification to something in referenced NuGet.Client library.
Milestone
Comments
Further discussion was had on this issue in the internal ticket here: https://gitlab.com/chocolatey/solutions/support-issues/-/issues/33 |
gep13
added
the
Requires NuGet.Client Change
This issue requires a modification to something in referenced NuGet.Client library.
label
Jul 14, 2023
10 tasks
AdmiringWorm
added a commit
to AdmiringWorm/choco
that referenced
this issue
Jul 24, 2023
As part of the changes that is coming in our custom flavor of NuGet.Client, the cache directories will now contain the a new folder where lock files are located when issuing HTTP requests. The cache command needs to ignore these directories as they may contain locked files that can not be cleaned up, and is not part of the cached HTTP queries.
gep13
added a commit
to AdmiringWorm/choco
that referenced
this issue
Jul 24, 2023
Start using 3.4.0, which includes a fix for a bug where saving of a lock file, used when creating a HTTP cache file, was not allowed due to invalid permissions.
10 tasks
gep13
pushed a commit
to AdmiringWorm/choco
that referenced
this issue
Jul 25, 2023
As part of the changes that is coming in our custom flavor of NuGet.Client, the cache directories will now contain the a new folder where lock files are located when issuing HTTP requests. The cache command needs to ignore these directories as they may contain locked files that can not be cleaned up, and is not part of the cached HTTP queries.
gep13
added a commit
to AdmiringWorm/choco
that referenced
this issue
Jul 25, 2023
Start using 3.4.0, which includes a fix for a bug where saving of a lock file, used when creating a HTTP cache file, was not allowed due to invalid permissions.
gep13
added a commit
that referenced
this issue
Jul 25, 2023
(#3264) Ignore lock folders in cache directories
gep13
changed the title
Unable to save HTTP Cache files when running as non-admin user when cacheLocation is set to point at Chocolatey ProgramData folder
Chocolatey CLI is unable to save HTTP Cache files when running as a non-admin user and the cacheLocation is set to point at the Chocolatey ProgramData folder
Jul 26, 2023
gep13
added a commit
that referenced
this issue
Jul 26, 2023
* release/2.2.0: (21 commits) (doc) Update to indicate new package version used (maint) Add helper to split on max line lengths (#3281) Add validation for cache folder permissions (#3264) Update to latest Chocolatey.NuGet.Client (#3264) Ignore lock folders in cache directories (#3186) Remove easter egg (doc) Improve error message for defaultPushSource (tests) Clear HTTP Cache before getting packages (#3258) Expand logging for nuget resources errors (maint) Set file encoding to include BOM (#3237) Reduce number of queries for dependencies (#3231) Add tests to ensure package listing (maint) Remove unnecessary using statements (#3231) Don't refresh local package info during upgrade no-ops (build) Update to latest recipe package (doc) Minor corrections to wording (#3242) Add a script to run Authenticated tests (#3242) Attempt default credentials for sources (maint) Fix incorrect naming style uses (doc) Apply scripting best practices to output ...
🎉 This issue has been resolved in version 2.2.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
gep13
changed the title
Chocolatey CLI is unable to save HTTP Cache files when running as a non-admin user and the cacheLocation is set to point at the Chocolatey ProgramData folder
Chocolatey CLI is unable to save HTTP Cache files when running as a non-admin user and the Aug 4, 2023
cachelocation
is set to point at the Chocolatey ProgramData folder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
5 - Released
Bug
Requires NuGet.Client Change
This issue requires a modification to something in referenced NuGet.Client library.
What You Are Seeing?
The problem that is being described here was first witnessed when running Chocolatey GUI in self-service mode, after running the standard ClientSetup.ps1 file. This file includes a change to the
cacheLocation
configuration value, to point it at achoco-cache
folder within Chocolatey's ProgramData folder. What follows is the original content of the issue that was raised, but the ultimate fix to this problem will be a change to the Chocolatey.NuGet.Client libraries, to change where thelock
file is created, when thecacheLocation
has been set to a location that a non-admin user doesn't have access to.Original Issue Content
When Chocolatey GUI is opened in a non-admin user account and a V2 feed source is selected, it is unable to fetch packages from a V2 feed, throws an Unhandled Exception, and then crashes.
When Chocolatey GUI is opened in an admin user account and a source is selected, there is no issue.
When Chocolatey GUI is opened in a non-admin user account and a V3 feed source is selected, it does not throw the Unhandled Exception, but it will hang for nearly an hour trying to read the source, and then fails with No Packages Found.
What is Expected?
Selecting a source with either a V2 or V3 feed should present the packages within that source for viewing and interaction.
How Did You Get This To Happen? (Steps to Reproduce)
V2 Feed
V3 Feed
Full Reproduction Steps
choco config set --name="'cacheLocation'" --value="'c:\programdata\chocolatey\choco-cache'"
choco outdated
System Details
Verification Images
Workarounds
Proposed Solution
A change will be needed to the Chocolatey.NuGet.Client libraries to allow the usage of another folder, that isn't the TEMP folder, for the creation of the lock files that are needed when writing HTTP Cache files to disk. This will mean that the writing of the lock files will not be dependent on the changes to the TEMP environment variable, which happens when the user sets the
cacheLocation
value.Related Issues and Tickets
Zendesk Ticket 18559
Zendesk Ticket 18560
Zendesk Ticket 18651
Zendesk Ticket 18676
Done Checklist
The text was updated successfully, but these errors were encountered: