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

problem with nfcore_cache.sqlite within /tmp #379

Closed
lucacozzuto opened this issue Sep 19, 2019 · 5 comments
Closed

problem with nfcore_cache.sqlite within /tmp #379

lucacozzuto opened this issue Sep 19, 2019 · 5 comments
Labels
bug Something isn't working command line tools Anything to do with the cli interfaces

Comments

@lucacozzuto
Copy link

lucacozzuto commented Sep 19, 2019

Hi all,
I think will be a nice idea to have the nfcore_cache.sqlite within a subfolder in tmp because if two users use the program at the same time the privileges will prevent to use the tool.

For example I cannot even use nf-core --help

Luca

@apeltzer apeltzer added bug Something isn't working command line tools Anything to do with the cli interfaces labels Sep 19, 2019
@sven1103
Copy link
Member

Thanks @lucacozzuto well spotted!

This is the code line that makes trouble:

cachedir = os.path.join(tempfile.gettempdir(), 'nfcore_cache')

I suggest to setup the cache directory locally in a folder .nfcore_cache in the user's home folder, instead of a system-wide available mount point.

Any objections?

@sven1103
Copy link
Member

@ewels I know that you initially wanted to support a multi-tenant system and went for the /tmp dir. However, we don't know the system's file permission policy, and chmod will not always work (as happened here).

@ewels
Copy link
Member

ewels commented Sep 19, 2019

Do we have any idea why this isn't working for multiple users at once? If it's world read-write then surely anyone should be able to use it?

I'm mostly just curious 😆

@drpatelh
Copy link
Member

@sven1103 Is whispering in my ear at the moment so forgive the typos because he isnt making any sense at all 😕

Apparently, some systems dont allow you to change permissions with chmod so basically the file will only how those permissions at the user-level. The permissions wont be changed if nf-core/tools is creating a cache directory with 777 permissions by someone else. @sven1103 will try to reproduce it.

@ewels
Copy link
Member

ewels commented Sep 19, 2019

Don't worry about it @sven1103 - let's just use your homedir solution 👍

@ewels ewels closed this as completed Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working command line tools Anything to do with the cli interfaces
Projects
None yet
Development

No branches or pull requests

5 participants