[Fix #127] Data dir permission is too wide #128
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
to:
cc: @subspacecommunity/subspace-maintainers
related to:
resolves: #127
Background
Data directory default permission is too wide that allows anyone from the system to read the configuration files
Changes
Testing
Using the updated entrypoint.sh
[root@localhost subspace]# rm -rf data
[root@localhost subspace]# docker-compose up -d
Creating subspace ... done
[root@localhost subspace]# ls -alh data
total 8.0K
drwxr-xr-x. 3 root root 42 Jul 26 02:29 .
drwxr-xr-x. 8 root root 156 Jul 26 02:28 ..
-rw-r--r--. 1 root root 4.3K Jul 26 02:29 config.json <- It was generated at later stage by the subspace process
drwx------. 4 root root 96 Jul 26 02:28 wireguard <- Permission tightened
[root@localhost subspace]# docker-compose restart
Restarting subspace ... done
[root@localhost subspace]# ls -alh data
total 8.0K
drwxr-xr-x. 3 root root 42 Jul 26 02:29 .
drwxr-xr-x. 8 root root 156 Jul 26 02:28 ..
-rw-------. 1 root root 4.3K Jul 26 02:29 config.json <- Permission tightened upon 2nd run
drwx------. 4 root root 96 Jul 26 02:28 wireguard