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

Data dir permission is too wide #127

Closed
ssiuhk opened this issue Jul 25, 2020 · 0 comments · Fixed by #128
Closed

Data dir permission is too wide #127

ssiuhk opened this issue Jul 25, 2020 · 0 comments · Fixed by #128
Labels
bug Something isn't working

Comments

@ssiuhk
Copy link

ssiuhk commented Jul 25, 2020

Describe the bug
data dir default permission is too wide, it allows anyone on the system to read confidential information such as private key

To Reproduce
Steps to reproduce the behavior:

  1. Launch subspace container with mapped local directory ./data:/data
  2. [root@localhost subspace]#tree -pufi data
    data
    [-rw-r--r-- root ] data/config.json
    [drwxr-xr-x root ] data/wireguard
    [drwxr-xr-x root ] data/wireguard/clients
    [-rw-r--r-- root ] data/wireguard/clients/null.conf
    [drwxr-xr-x root ] data/wireguard/peers
    [-rw-r--r-- root ] data/wireguard/peers/null.conf
    [-rw-r--r-- root ] data/wireguard/server.conf
    [-rw-r--r-- root ] data/wireguard/server.private
    [-rw-r--r-- root ] data/wireguard/server.public

3 directories, 6 files

Expected behavior
Configuration files (which may contains confidential information) and private keys should be readable by owner only. Moreover the directory permission can be tighten as well.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

ssiuhk added a commit to ssiuhk/subspace that referenced this issue Jul 25, 2020
- Changed umask of the user during the section creating configuration files
- Added special handling for config.json to update the permission upon next start-up
@jack1902 jack1902 added the bug Something isn't working label Oct 2, 2020
agonbar pushed a commit that referenced this issue May 16, 2021
- Changed umask of the user during the section creating configuration files
- Added special handling for config.json to update the permission upon next start-up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants