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

[BUG] Error: EACCES: permission denied, scandir '/home/runner/work/*/*/.pytest_cache' #411

Closed
4 tasks done
deechauhan opened this issue May 3, 2024 · 1 comment · Fixed by #412
Closed
4 tasks done
Labels
bug Something isn't working

Comments

@deechauhan
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Does this issue exist in the latest version?

  • I'm using the latest release

Describe the bug?

We use verify-changed-files to check whether a file (coverage-badge.svg) has been changed or not. Recently, we started seeing the error Error: EACCES: permission denied, scandir '/home/runner/work/ugc-api-utils/ugc-api-utils/.pytest_cache' and this happens according to the logs when tj-actions/glob@v21 starts doing ##[debug]gitignore file patterns: and one of the patterns in our gitignore is .pytest_cache (which has always been there).

This error only started happening today and i don't see how a permission issue can occur here since the workflow is the same and hasn't been changed.

To Reproduce

This is happening in a private repository. Steps we followed:

  1. Added a coverage-badge.svg file in actions (this was added in the files argument in verify-changed-files)
  2. Ran the action through a workflow which is triggered on every push
  3. This error was raised Error: EACCES: permission denied, scandir '/home/runner/work/ugc-api-utils/ugc-api-utils/.pytest_cache'

What OS are you seeing the problem on?

ubuntu-latest or ubuntu-22.04

Expected behavior?

Permission error not to be raised

Relevant log output

Run tj-actions/verify-changed-files@v19
  with:
    files: coverage-badge.svg
  
    files-separator: 
  
    separator:  
    match-gitignore-files: false
    fail-if-changed: false
    fail-message: Files have changed.
    safe_output: true
    path: .
    quotepath: true
##[debug]Evaluating condition for step: 'run'
##[debug]Evaluating: (success() && (inputs.files != ''))
##[debug]Evaluating And:
##[debug]..Evaluating success:
##[debug]..=> true
##[debug]..Evaluating NotEqual:
##[debug]....Evaluating Index:
##[debug]......Evaluating inputs:
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'files'
##[debug]....=> 'coverage-badge.svg
##[debug]!.pytest_cache
##[debug]'
##[debug]....Evaluating String:
##[debug]....=> ''
##[debug]..=> true
##[debug]=> true
##[debug]Expanded: (true && ('coverage-badge.svg
##[debug]!.pytest_cache
##[debug]' != ''))
##[debug]Result: true
##[debug]Starting: run
##[debug]Register post job cleanup for action: tj-actions/glob@v21
##[debug]Loading inputs
##[debug]Evaluating: inputs.files
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'files'
##[debug]=> 'coverage-badge.svg
##[debug]!.pytest_cache
##[debug]'
##[debug]Result: 'coverage-badge.svg
##[debug]!.pytest_cache
##[debug]'
##[debug]Evaluating: inputs.files-separator
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'files-separator'
##[debug]=> '
##[debug]'
##[debug]Result: '
##[debug]'
##[debug]Evaluating: inputs.match-gitignore-files
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'match-gitignore-files'
##[debug]=> 'false'
##[debug]Result: 'false'
##[debug]Evaluating: inputs.safe_output
##[debug]Evaluating Index:
##[debug]..Evaluating inputs:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'safe_output'
##[debug]=> 'true'
##[debug]Result: 'true'
##[debug]Evaluating: github.event.pull_request.base.ref
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating github:
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'event'
##[debug]......=> Object
##[debug]......Evaluating String:
##[debug]......=> 'pull_request'
##[debug]....=> null
##[debug]..=> null
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: github.event.pull_request.head.repo.fork
##[debug]Evaluating Index:
##[debug]..Evaluating Index:
##[debug]....Evaluating Index:
##[debug]......Evaluating Index:
##[debug]........Evaluating Index:
##[debug]..........Evaluating github:
##[debug]..........=> Object
##[debug]..........Evaluating String:
##[debug]..........=> 'event'
##[debug]........=> Object
##[debug]........Evaluating String:
##[debug]........=> 'pull_request'
##[debug]......=> null
##[debug]....=> null
##[debug]..=> null
##[debug]=> null
##[debug]Result: null
##[debug]Evaluating: github.sha
##[debug]Evaluating Index:
##[debug]..Evaluating github:
##[debug]..=> Object
##[debug]..Evaluating String:
##[debug]..=> 'sha'
##[debug]=> '45b55624ac87324aac44ba2a5ad7d1c73377157b'
##[debug]Result: '45b55624ac87324aac44ba2a5ad7d1c73377157b'
##[debug]Loading env
Run tj-actions/glob@v21
  with:
    files: coverage-badge.svg
  !.pytest_cache
  
    files-separator: 
  
    separator: |
    match-directories: false
    match-gitignore-files: false
    escape-paths: true
    excluded-files-separator: 
  
    files-from-source-file-separator: 
  
    excluded-files-from-source-file-separator: 
  
    follow-symbolic-links: true
    strip-top-level-dir: true
    include-deleted-files: false
    sha: 45b55624ac87324aac44ba2a5ad7d1c73377157b
    working-directory: .
##[debug]file patterns: coverage-badge.svg
##[debug]!.pytest_cache
##[debug]file patterns: /home/runner/work/ugc-api-utils/ugc-api-utils/coverage-badge.svg
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.pytest_cache
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.git/**
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/**/node_modules/**
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/node_modules/**
##[debug]followSymbolicLinks 'true'
##[debug]matchDirectories 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'true'
##[debug]matchDirectories 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/ugc-api-utils/ugc-api-utils/coverage-badge.svg'
##[debug]gitignore file patterns: /home/runner/work/ugc-api-utils/ugc-api-utils/node_modules/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*~
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.fuse_hidden*
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.directory
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.Trash-*
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.nfs*
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.DS_Store
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.AppleDouble
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.LSOverride
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/Icon
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/._*
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.DocumentRevisions-V100
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.fseventsd
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.Spotlight-V100
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.TemporaryItems
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.Trashes
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.VolumeIcon.icns
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.com.apple.timemachine.donotpresent
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.AppleDB
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.AppleDesktop
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/Network Trash Folder
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/Temporary Items
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.apdisk
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/*
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/workspace.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/tasks.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/usage.statistics.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/dictionaries
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/shelf
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/aws.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/contentModel.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/dataSources/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/dataSources.ids
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/dataSources.local.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/sqlDataSources.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/dynamic.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/uiDesigner.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/dbnavigator.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/gradle.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/libraries
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/cmake-build-*/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/mongoSettings.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.iws
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/out/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea_modules/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/atlassian-ide-plugin.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/replstate.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/sonarlint/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/com_crashlytics_export_strings.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/crashlytics.properties
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/crashlytics-build.properties
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/fabric.properties
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/httpRequests
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/caches/build_file_checksums.ser
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/sonarlint/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/sonarIssues.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/markdown-navigator.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/markdown-navigator-enh.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/markdown-navigator/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/$CACHE_FILE$
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/codestream.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**/azureSettings.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/__pycache__/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.py[cod]
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*$py.class
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.so
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.Python
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/build/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/develop-eggs/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/dist/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/downloads/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/eggs/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.eggs/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/lib/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/lib64/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/parts/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/sdist/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/var/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/wheels/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/share/python-wheels/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.egg-info/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.installed.cfg
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.egg
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/MANIFEST
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.manifest
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.spec
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/pip-log.txt
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/pip-delete-this-directory.txt
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/htmlcov/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.tox/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.nox/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.coverage
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.coverage.*
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.cache
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/nosetests.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/coverage.xml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.cover
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.py,cover
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.hypothesis/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.pytest_cache/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/cover/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.mo
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.pot
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.log
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/local_settings.py
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/db.sqlite3
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/db.sqlite3-journal
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/instance/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.webassets-cache
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.scrapy
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/docs/_build/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.pybuilder/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/target/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.ipynb_checkpoints
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/profile_default/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/ipython_config.py
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.pdm.toml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/__pypackages__/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/celerybeat-schedule
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/celerybeat.pid
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.sage.py
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.env
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.venv
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/env/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/venv/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/ENV/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/env.bak/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/venv.bak/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.spyderproject
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.spyproject
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.ropeproject
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/site
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.mypy_cache/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.dmypy.json
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/dmypy.json
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.pyre/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.pytype/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/cython_debug/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/poetry.toml
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.vscode/*
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.vscode/settings.json
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.vscode/tasks.json
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.vscode/launch.json
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.vscode/extensions.json
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.vscode/*.code-snippets
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.history/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.vsix
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.history
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.ionide
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/Thumbs.db
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/Thumbs.db:encryptable
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/ehthumbs.db
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/ehthumbs_vista.db
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.stackdump
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/[Dd]esktop.ini
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/$RECYCLE.BIN/**
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.cab
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.msi
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.msix
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.msm
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.msp
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/*.lnk
##[debug]/home/runner/work/ugc-api-utils/ugc-api-utils/.idea/**
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/.git/**
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/**/node_modules/**
##[debug]!/home/runner/work/ugc-api-utils/ugc-api-utils/node_modules/**
##[debug]followSymbolicLinks 'true'
##[debug]matchDirectories 'false'
##[debug]followSymbolicLinks 'true'
##[debug]implicitDescendants 'true'
##[debug]matchDirectories 'false'
##[debug]omitBrokenSymbolicLinks 'true'
##[debug]Search path '/home/runner/work/ugc-api-utils/ugc-api-utils'
Error: EACCES: permission denied, scandir '/home/runner/work/ugc-api-utils/ugc-api-utils/.pytest_cache'

Has all relevant logs been included?

  • I've included all relevant logs

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@deechauhan deechauhan added the bug Something isn't working label May 3, 2024
@jackton1 jackton1 linked a pull request May 4, 2024 that will close this issue
@jackton1
Copy link
Member

jackton1 commented May 4, 2024

Hi @deechauhan, you can now prevent the glob action from accessing the .gitgnore file to resolve this error using the latest release.

Example

- name: Verify Changed files
  uses: tj-actions/verify-changed-files@v20
  with:
    files: coverage-badge.svg
    read-gitignore: false

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants