Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

pgutil Access denied



  • Hello,

    I am trying to implement pgutil to my Project but i get a folder access denied error message but i am the owner of the folder
    It is just a normal FastAPI Python project
    command:
    pgutil builds scan --project-name="Project" --version="1.0" --source="https://proget.test.com" --api-key="API-KEY" --scanner-type="PyPI"
    i tried the pgutil.exe and also the dotnet version
    Error message:
    Access to the path 'C:\dev\PythonFastAPI' is denied.

    edit:
    i also tried it on my local Linux VM and there is the same issue


    Log in to reply
     

  • inedo-engineer

    Hi @si-peham_2672,

    When you say owner, you mean you have full control on the folder correct? When the --input parameter is omitted, it will attempt to scan the directory for the requirments.txt file. I'm guessing that is causing the issue. A workaround you can try is to specify the path for the requirements.txt file for the --input parameter and see if that works.

    Thanks,
    Dan



  • Yes, this means I have full control with the --input parameter and the requirements.txt file. However, I now get this error:

    Server responded with InternalServerError (500): Specified argument was out of the range of valid values. (Parameter 'code')
    

    In the meantime, I tried pgutil builds create and this is working.


  • inedo-engineer

    Hi @si-peham_2672,

    I think this is related to a recent Audit API bug, PG-2941. We will be releasing that fix in ProGet 2024.33 due out on Friday. Can you please try running that with the --noaudit parameter? That will bypass the audit portion in the scan. That will at least scan the "requirements.txt" file and create the build, then the audit will then be performed later by ProGet.

    Thanks,
    Dan



  • @Dan_Woolf said in pgutil Access denied:

    --noaudit

    yes with the command it works.

    pgutil builds scan --project-name="Project" --version="1.0" --source="https://proget.test.com"--api-key="API-KEY" --scanner-type="PyPI" --input=./requirements.txt --noaudit
    

    Thanks.


  • inedo-engineer

    Hi @si-peham_2672,

    As far as I can tell, it looks like there is still a permission issue with the working directory that is preventing file listing. The workaround to use the --input argument seems to get past that issue, so I would continue to use that. For your reference, I did test this locally and on a test server, and both worked without issue. If you are interested, here is a link to our code that is searching for the file (https://github.com/Inedo/pgutil/blob/5001174a4c786bb238e8546d18d82fed71cfcc58/Inedo.ProGet/Scan/DependencyScanner.cs#L114). The SourceFileSystem.Default.FindFilesAsync just calls new DirectoryInfo(folder).EnumerateFiles and then matches against the name.

    For the Specified argument was out of the range of valid values error, that will be resolved in ProGet 2024.33, which will be released this Friday.

    If you have any other questions, please let us know.

    Thanks,
    Dan


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation