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

permission denied to ~/.nimble/pkgs is fatal #748

Closed
disruptek opened this issue Dec 6, 2019 · 8 comments
Closed

permission denied to ~/.nimble/pkgs is fatal #748

disruptek opened this issue Dec 6, 2019 · 8 comments

Comments

@disruptek
Copy link

I cannot use commands such as test, dump, check, doc, etc. when Nimble doesn't have permission to ~/.nimble/pkgs.

@disruptek
Copy link
Author

Ditto $TMPDIR.

@genotrance
Copy link
Contributor

I just set ~/.nimble/pkgs to be owned by root and was able to run all the above commands as a regular user.

$TMPDIR is a different story though since nimblecache lives there.

@disruptek
Copy link
Author

How is that useful?

@genotrance
Copy link
Contributor

To test whether ~/.nimble/pkgs being inaccessible makes any difference to Nimble, and it did not. Not for the commands you mentioned at least. An error snippet would help to figure out what's going on.

@disruptek
Copy link
Author

Here's a reproduction that demonstrates my problem:

$ chmod 0 ~/.nimble
$ nimble dump
oserr.nim(94)            raiseOSError
Error: unhandled exception: Permission denied
Additional info: "/home/adavidoff/.nimble/pkgs" [OSError]
$ nimble test
oserr.nim(94)            raiseOSError
Error: unhandled exception: Permission denied
Additional info: "/home/adavidoff/.nimble/pkgs" [OSError]

When I cannot control the behavior of software I do not trust, I do not use that software.

@genotrance
Copy link
Contributor

PR #768 will fix the issue around the pkgs directory. nimble needs to get package info for dependencies and currently copies a nims file in each dep to get pkg info. The PR will no longer need files to be copied around.

However, we still rely on $TMPDIR for nimblecache so that has no real fix.

@Araq
Copy link
Member

Araq commented Feb 14, 2020

When I cannot control the behavior of software I do not trust, I do not use that software.

Sure but forbidding Nimble access to ~/.nimble/pkgs is deliberately breaking Nimble. "Won'f fix"? What should Nimble do instead? Continue like nothing happened?

@disruptek
Copy link
Author

Either Nimble is intended to require read access to ~/.nimble or it isn't.

Since you asked, I think nimble dump should work regardless of whether Nimble can read/write my ~/.nimble. Ditto other operations on the local project, such as test, check, and so on.

I am fine with closing this ticket if this is the intended behavior; I just felt that the error message suggested otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants