Scoop icon indicating copy to clipboard operation
Scoop copied to clipboard

[Bug] Issue with Scoop Export: Dubious Ownership Detected in Repository

Open bayeslearnerold opened this issue 2 years ago • 3 comments

Title: Issue with Scoop Export: Dubious Ownership Detected in Repository

Bug Report

Current Behavior

While running scoop export command, I encountered an issue with ownership in the Scoop repository. Specifically, a fatal error was raised indicating dubious ownership in the repository at 'C:/Users/xxx/scoop/buckets/main'. The error message stated that this directory is owned by 'S-1-5-32-544', but the current user is 'S-1-5-21-883395466-3049311533-3443746805-1001'. This issue prevented the execution of the scoop export command initially.

Expected Behavior

The scoop export command should execute without any ownership or permission issues, allowing for the successful export of Scoop configurations.

Additional context/output

Here is the PowerShell output when the issue occurred:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS C:\Users\xxx> scoop export > 'C:\Users\xxx\OneDrive\config\win11\scoop.export'
fatal: detected dubious ownership in repository at 'C:/Users/xxx/scoop/buckets/main'
'C:/Users\xxx/scoop/buckets/main' is owned by:
        'S-1-5-32-544'
but the current user is:
        'S-1-5-21-883395466-3049311533-3443746805-1001'
To add an exception for this directory, call:

        git config --global --add safe.directory C:/Users/xxx/scoop/buckets/main
PS C:\Users\kunde> git config --global --add safe.directory C:/Users/xxx/scoop/buckets/main
PS C:\Users\kunde> scoop export > 'C:\Users\xxx\OneDrive\config\win11\scoop.export'

Possible Solution

A temporary workaround I used was to add an exception for the directory using git config --global --add safe.directory C:/Users/xxx/scoop/buckets/main. However, this seems more like a workaround rather than a permanent solution.

System details

Windows version: windows 11

OS architecture: AMD64

PowerShell version: 7.4

Additional software: [If applicable, please list any additional software you are using]

bayeslearnerold avatar Jan 10 '24 21:01 bayeslearnerold

Did you migrate Scoop from another user account or reset/reinstall OS then log in another account?

The same error should occur when you execute scoop bucket list

If it's just caused by git/bucket repo:

scoop install git # skip if already installed
scoop bucket rm <bucket_name>; scoop bucket add <bucket_name>

Scoop cannot solve permissions issue on your OS by any changes.

HUMORCE avatar Jan 10 '24 21:01 HUMORCE

I believe I accidentally ran scoop using admin terminal. Does it cause any other problems? I have not seen any issue so far.

bayeslearnerold avatar Jan 10 '24 23:01 bayeslearnerold

Does it cause any other problems?

No

HUMORCE avatar Jan 11 '24 09:01 HUMORCE