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

writting properties files may trigger EACCES: permission denied errors #9

Closed
maxlath opened this issue Aug 27, 2016 · 6 comments
Closed
Labels

Comments

@maxlath
Copy link
Owner

maxlath commented Aug 27, 2016

created a dedicated thread for this issue discussion started in here
@nichtich:

there is a bug if you installed wikidata-cli globally:

$ qclaims Q2112 P625
Error: EACCES: permission denied, open '/usr/local/lib/node_modules/wikidata-cli/props/de.json'
    at Error (native) 
Context:
 undefined

@maxlath:

Damn, I didn't see that "permission denied" message coming: I installed node with nvm which setups node modules in the home folder /home/username/.nvm/versions/node/v4.4.5/lib/node_modules/wikidata-cli/props/de.json. Would the solution be to create a dedicated folder in the user home (like /home/username/.wikidata-filter) where we would have the right to write anything that we need?
Fyi, another consumer of those properties files is wdprops and the properties are taken fresh out of the SPARQL endpoint: we got to cache that in some way to avoid spamming the endpoint with what starts to be a heavy query, thus the use of local files.

@maxlath maxlath added the bug label Aug 27, 2016
@maxlath
Copy link
Owner Author

maxlath commented Aug 29, 2016

@nichtich did you install node using sudo?

@nichtich
Copy link
Contributor

I think so

@maxlath
Copy link
Owner Author

maxlath commented Aug 29, 2016

so I guess you had to install wikidata-cli using sudo too, that would explain the higher level of authorization required: wd claims or wd props would thus probably work if prefixed by sudo at least every time properties are requested in a new language. Further accesses will probably not require it as it would only be read operations

@nichtich
Copy link
Contributor

Yes, that's a workaround. If wd will include other write-to-disk operations (wikidata-token?) it may stil worth to reconsider using a file location based on current user.

@maxlath
Copy link
Owner Author

maxlath commented Sep 12, 2016

or run chmod 666 ./props during the postinstall script?

@maxlath
Copy link
Owner Author

maxlath commented Jan 21, 2017

reverted dcdbaa8 with d97498d: using chmod during postinstall doesn't seem to be an option

maxlath added a commit that referenced this issue Jan 28, 2017
instead of writing in the module folder
addressing #9 and #16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants