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

Permissions issues with check_samplesheet.py #24

Closed
slsevilla opened this issue Nov 1, 2023 · 6 comments · Fixed by #25
Closed

Permissions issues with check_samplesheet.py #24

slsevilla opened this issue Nov 1, 2023 · 6 comments · Fixed by #25
Assignees
Labels
bug Something isn't working

Comments

@slsevilla
Copy link
Contributor

Description of the bug

Running the test data sends a permission error due to permissions on the python samplesheet check file check_samplesheet.py

Command used and terminal output

cruise run --mode local -profile test -preview

Error

Traceback (most recent call last):
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/bin/cruise", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 119, in main
    cli()
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 92, in run
    run_nextflow(
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 157, in run_nextflow
    chmod_bins_exec()
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 104, in chmod_bins_exec
    os.chmod(
PermissionError: [Errno 1] Operation not permitted: '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/check_samplesheet.py'

Looking at permissions, there isn't global read access:

-rwxrwx--- 1 sovacoolkl CCBR 6440 Nov  1 15:18 /gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/check_samplesheet.py


### Relevant files

_No response_

### System information

_No response_
@slsevilla slsevilla added the bug Something isn't working label Nov 1, 2023
@kelly-sovacool
Copy link
Member

Thanks for catching this, @slsevilla. I believe I've fixed the error, can you check that cruise run works for you now?

@kelly-sovacool kelly-sovacool self-assigned this Nov 2, 2023
@slsevilla
Copy link
Contributor Author

Hi - there's another permission issue within '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/__pycache__':

[sevillas2@cn3102 test_data]$ cruise run --mode local -profile test -preview
Traceback (most recent call last):
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/bin/cruise", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 119, in main
    cli()
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1078, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CHAMPAGNE/v0.2/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/__main__.py", line 92, in run
    run_nextflow(
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 157, in run_nextflow
    chmod_bins_exec()
  File "/data/CCBR_Pipeliner/Pipelines/CRUISE/v0.1/cruise/src/util.py", line 104, in chmod_bins_exec
    os.chmod(
PermissionError: [Errno 1] Operation not permitted: '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/__pycache__'

Permissions on this:

ls -la '/gpfs/gsfs10/users/CCBR_Pipeliner/Pipelines/CRUISE/.v0.1.0/cruise/bin/__pycache__'
total 130
drwxrwxr-- 2 sovacoolkl CCBR 4096 Nov  2 10:38 .
drwxrwxr-- 3 sovacoolkl CCBR 4096 Nov  2 10:38 ..
-rw-rw-r-- 1 sovacoolkl CCBR 9103 Nov  2 10:38 check_samplesheet.cpython-311.pyc

@kelly-sovacool
Copy link
Member

Ooh, this is a big problem since pycache files are made automatically when you run a python script, so the pycache will belong to whoever first called the script...

Surely this isn't a problem for other tools installed to shared locations e.g. /usr/local/bin/. I'll do some digging to figure out how to avoid this.

@kelly-sovacool
Copy link
Member

Ok @slsevilla I think I've fixed it, can you try again?

@slsevilla
Copy link
Contributor Author

Both the preview and slurm job submission ran successfully! Will monitor test run and update this issue.

@slsevilla
Copy link
Contributor Author

Cleared permissions related issue getting pipeline kicked off!

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