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
Better permission error message #6
Comments
I don't know how helpful of a message can be provided, since each occurrence of the error would be very different from the last. Can we print out the current perms and ownership of the file and then a whoami? Might be able to check if the ownership matches the whoami result, and then know that permissions are the issue. Either way, displaying that to the user could be helpful. On the other hand, it could be dangerous as well, as they might just try chmodding the world 777 and setting wild chowns. I would think ownership is more the issue than permissions, but that's just a guess. I don't know if a guide would be more helpful than just printing out how to chmod and chown a file, but we won't know what to recommend setting the permissions to. Maybe easiest is just pasting the link to google, prepopulated with a query that matches the error :-S I'm typing on an iPad and losing my mind with back spacing, so I'm just going to leave on this note, just to throw something out there:
|
That's a good point. Let's play it safe and include both commands:
For the user configuration files |
Hmm, let's search and see if we can find a good guide we can link to. I agree we should be careful about what we tell the user.
Why not just $USER? What's the second part?
Isn't 755 the norm? |
Since user configs could contain sensitive data I don't see why it should be readable by others. The second part of the chown statement sets it to the user's primary group. That could be useful if it was previously owned by root. |
Then why not 600?
k, cool. can be shortened to |
Agreed. :) |
In our attempt to make everything more userfriendly we should try to help the user out more if it encounters an permission error. I've seen many of these in the wild and there isn't a lot of documentation on how to fix if you don't know about chown/chmod.
configstore/configstore.js
Line 14 in 9977bae
We need to come up with a good error message on how they can fix the problem. Do you know any good guides we can link to? According to passy it could either be solved with
chown
orchmod
, but in Windows I have like no idea. The text also needs to be easily understandable. This is not just for this module as we can reuse it.@passy @stephenplusplus @btford @addyosmani
The text was updated successfully, but these errors were encountered: