forked from TrueCloudLab/distribution
Relaxes filesystem driver permissions to 0777 (dirs) and 0666 (files)
Leaves any further permissions restrictions to the process umask Signed-off-by: Brian Bland <brian.bland@docker.com>
This commit is contained in:
parent
e02a0b0399
commit
f19deba809
1 changed files with 2 additions and 2 deletions
|
@ -135,11 +135,11 @@ func (d *driver) WriteStream(ctx context.Context, subPath string, offset int64,
|
||||||
|
|
||||||
fullPath := d.fullPath(subPath)
|
fullPath := d.fullPath(subPath)
|
||||||
parentDir := path.Dir(fullPath)
|
parentDir := path.Dir(fullPath)
|
||||||
if err := os.MkdirAll(parentDir, 0755); err != nil {
|
if err := os.MkdirAll(parentDir, 0777); err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
fp, err := os.OpenFile(fullPath, os.O_WRONLY|os.O_CREATE, 0644)
|
fp, err := os.OpenFile(fullPath, os.O_WRONLY|os.O_CREATE, 0666)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
// TODO(stevvooe): A few missing conditions in storage driver:
|
// TODO(stevvooe): A few missing conditions in storage driver:
|
||||||
// 1. What if the path is already a directory?
|
// 1. What if the path is already a directory?
|
||||||
|
|
Loading…
Reference in a new issue