Comments (6)
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:
Hmm, permissions error? Do you know anything about this?
/user/blah/blah.txt - user:group - 600We don't seem to have the permission to access this file. Can you give it to us?
Try chmod 755 /user/blah/blah.txt
from configstore.
On the other hand, it could be dangerous as well, as they might just try chmodding the world 777 and setting wild chowns.
That's a good point. Let's play it safe and include both commands:
We don't seem to have the permission to access this file. Can you give it to us?
Try:
chmod 750 /path/to/blah.txt
chown$USER:$ (id -g -n $USER) /path/to/blah.txt
For the user configuration files 750
should be reasonable, right?
from configstore.
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.
$USER:$ (id -g -n $USER)
Why not just $USER? What's the second part?
For the user configuration files 750 should be reasonable, right?
Isn't 755 the norm?
from configstore.
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.
from configstore.
Since user configs could contain sensitive data I don't see why it should be readable by others.
Then why not 600?
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.
k, cool. can be shortened to $USER:$(id -gn $USER)
from configstore.
Then why not 600?
Agreed. :)
from configstore.
Related Issues (20)
- Option to determine presence of a config file? HOT 4
- v5 is not working with SNAP HOT 6
- release for CVE-2020-8116 HOT 1
- Versioning the config store HOT 3
- How to handle arrays? HOT 1
- Whether to use `configstore` or `<package name>` should be a *user* option HOT 1
- thank you HOT 1
- v3.1.3 is now breaking node 6 builds HOT 3
- Allow user to override location of `configstore` directory using an environment variable HOT 1
- Requiring Node.js 10+? HOT 2
- You want to provide the same path of electronic store HOT 2
- What parameters are needed to set the path to electron-sotre HOT 2
- Current version not working with node js application HOT 1
- After Requiring Error HOT 4
- Secure temp dir in NodeJS without dependencies
- in v6.0.0 with typescript, giving error regarding dynamic import HOT 2
- is gracefull fs still needed? HOT 3
- Does the persistent file change consider supporting monitoring configuration file changes? HOT 1
- Relax 5.x version requirement on make-dir to allow 4.x (as well as 3.x)? HOT 1
- Make rewriting of JSONs with syntax errors optional
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from configstore.