Commit 97ba518d authored by ale's avatar ale
Browse files

Relax default permissions of created directories

Fixes issue #1.
parent 1e728c56
......@@ -131,3 +131,6 @@ can be used to set up multiple replds instances. For an instance named
will create the *replds-foo* user and group. Add users that need to
read the repository files to that group. The configuration will be
read from */etc/replds/foo.yml*.
Note that files created by the daemon will be world-readable by
default. Set the process umask if you wish to restrict this further.
......@@ -55,7 +55,7 @@ func (f *FS) setNode(node Node) error {
// Create parent directory if it does not exist.
dir := filepath.Dir(path)
if _, err := os.Stat(dir); os.IsNotExist(err) {
if err = os.MkdirAll(dir, 0700); err != nil {
if err = os.MkdirAll(dir, 0755); err != nil {
return err
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment