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

Problems with Cache Directory and Permission #53

Closed
Elch08 opened this issue Jan 17, 2017 · 4 comments
Closed

Problems with Cache Directory and Permission #53

Elch08 opened this issue Jan 17, 2017 · 4 comments

Comments

@Elch08
Copy link

Elch08 commented Jan 17, 2017

I have problems with the following line in the config.json file: ""cacheDirectory": "./.node-persist/storage", 
I always get the following error when starting homebridge:

_[2017-01-17 20:37:56] Initializing People platform...
/usr/lib/node_modules/homebridge-people/node_modules/node-persist/node_modules/mkdirp/index.js:74
throw err0;
^

Error: EACCES: permission denied, mkdir '/usr/lib/node_modules/homebridge-people/node_modules/node-persist/storage'
at Error (native)
at Object.fs.mkdirSync (fs.js:794:18)
at sync (/usr/lib/node_modules/homebridge-people/node_modules/node-persist/node_modules/mkdirp/index.js:55:12)
at sync (/usr/lib/node_modules/homebridge-people/node_modules/node-persist/node_modules/mkdirp/index.js:61:24)_

Then Homebridge is crashing. I can, however, start homebridge with the command "sudo homebridge" or when logged in as Root. So it seems to be a permission error but I have no idea which one. So I always deleted the above line for the Cache Directory, because you marked it as "optional". But I would prefere to use the line in the config.json. Can you please help me ?

Thanks in advance
Björn #

@benzman81
Copy link
Contributor

This is exactly the issue why it is changeable via configuration. Just point it to a directory with permissions.

@Elch08
Copy link
Author

Elch08 commented Jan 17, 2017

I tried and put in a different Directory, where I presumably have permission. But the error Code ist exactly the same. Maybe I did not get what you meant by "poiting it to a Directory with permission". Do you have an example ?

@benzman81
Copy link
Contributor

Hmm, thats weird. Anbexample would be:

"cacheDirectory": "/home/myuser/people-storage"

Maybe try to chmod 777 to that directory as a test.

@Elch08
Copy link
Author

Elch08 commented Jan 17, 2017

Super. I did the following: "sudo chmod -R 777 /usr/lib/node_modules/homebridge-people/node_modules/node-persist/storage". This gave me permission and now the error message is gone.

@Elch08 Elch08 closed this as completed Jan 17, 2017
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

2 participants